]> git.mxchange.org Git - friendica.git/blob - src/Util/Logger/README.md
Rename & Testfix
[friendica.git] / src / Util / Logger / README.md
1 ## Friendica\Util\Logger
2
3 This namespace contains the different implementations of a Logger.
4
5 ### Configuration guideline
6
7 The following settings are possible for `logger_config`:
8 -       `monolog`: A Logging framework with lots of additions (see [Monolog](https://github.com/Seldaek/monolog/)). There are just Friendica additions inside the Monolog directory
9 -       [`stream`](StreamLogger.php): A small logger for files or streams
10 -       [`syslog`](SyslogLogger.php): Prints the logging output into the syslog
11
12 [`VoidLogger`](VoidLogger.php) is a fallback logger without any function if no debugging is enabled.
13
14 [`ProfilerLogger`](ProfilerLogger.php) is a wrapper around an existing logger in case profiling is enabled for Friendica.
15 Every log call will be saved to the `Profiler` with a timestamp.
16
17 ### Implementation guideline
18
19 Each logging implementation should pe capable of printing at least the following information:
20 -       An unique ID for each Request/Call
21 -       The process ID (PID)
22 -       A timestamp of the logging entry
23 -       The critically of the log entry
24 -       A log message
25 -       A context of the log message (f.e which user)
26
27 If possible, a Logger should extend [`AbstractLogger`](AbstractLogger.php), because it contains additional, Friendica specific business logic for each logging call.