friendica/src/Util/Logger
2021-04-01 20:55:25 +02:00
..
Monolog Update copyright 2021-03-29 08:40:20 +02:00
AbstractLogger.php Fix Object parsing for Logging 2021-04-01 20:55:25 +02:00
ProfilerLogger.php Update copyright 2021-03-29 08:40:20 +02:00
README.md Rename & Testfix 2019-03-22 23:13:25 -04:00
StreamLogger.php Merge branch '2021.03-rc' into copyright-2021 2021-03-29 08:45:21 +02:00
SyslogLogger.php Merge branch '2021.03-rc' into copyright-2021 2021-03-29 08:45:21 +02:00
VoidLogger.php Update copyright 2021-03-29 08:40:20 +02:00
WorkerLogger.php Update copyright 2021-03-29 08:40:20 +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.