1
0
Fork 0
friendica_2020-09-1_sharedH.../src/Util/Logger
Philipp Holzer 6c2cf494b5
Remove DependencyFactory
- Include all necessary classes in `dependencies.config.php`
- Add DI-reference to BaseObject (acts as a global registry)
- Refactor all static "init()" methods to use the global registry

- Refactor Logging for Worker-Logger a little bit
2019-07-27 23:54:12 +02:00
..
Monolog Rename & Testfix 2019-03-22 23:13:25 -04:00
AbstractLogger.php Rename & Testfix 2019-03-22 23:13:25 -04:00
ProfilerLogger.php Added StreamLogger and ProfilerLogger 2019-03-22 23:13:23 -04:00
README.md Rename & Testfix 2019-03-22 23:13:25 -04:00
StreamLogger.php Set Timezone to 'UTC' for every Logger (Develop) 2019-03-22 23:14:48 -04:00
SyslogLogger.php Adding Logger Tests 2019-03-22 23:13:26 -04:00
VoidLogger.php Syslog - Disabling 2019-03-22 22:55:46 -04:00
WorkerLogger.php Remove DependencyFactory 2019-07-27 23:54:12 +02:00

Friendica\Util\Logger

This namespace contains the different implementations of a Logger.

Configuration guideline

The following settings are possible for logger_config:

  • monolog: A Logging framework with lots of additions (see Monolog). There are just Friendica additions inside the Monolog directory
  • stream: A small logger for files or streams
  • syslog: Prints the logging output into the syslog

VoidLogger is a fallback logger without any function if no debugging is enabled.

ProfilerLogger is a wrapper around an existing logger in case profiling is enabled for Friendica. Every log call will be saved to the Profiler with a timestamp.

Implementation guideline

Each logging implementation should pe capable of printing at least the following information:

  • An unique ID for each Request/Call
  • The process ID (PID)
  • A timestamp of the logging entry
  • The critically of the log entry
  • A log message
  • A context of the log message (f.e which user)

If possible, a Logger should extend AbstractLogger, because it contains additional, Friendica specific business logic for each logging call.