]> git.mxchange.org Git - friendica.git/blob - src/Core/Logger/Type/README.md
Merge pull request #12316 from VVelox/load_fix
[friendica.git] / src / Core / Logger / Type / 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 -       [`stream`](StreamLogger.php): A small logger for files or streams
9 -       [`syslog`](SyslogLogger.php): Prints the logging output into the syslog
10
11 [`VoidLogger`](VoidLogger.php) is a fallback logger without any function if no debugging is enabled.
12
13 [`ProfilerLogger`](ProfilerLogger.php) is a wrapper around an existing logger in case profiling is enabled for Friendica.
14 Every log call will be saved to the `Profiler` with a timestamp.
15
16 ### Implementation guideline
17
18 Each logging implementation should pe capable of printing at least the following information:
19 -       An unique ID for each Request/Call
20 -       The process ID (PID)
21 -       A timestamp of the logging entry
22 -       The critically of the log entry
23 -       A log message
24 -       A context of the log message (f.e which user)
25
26 If possible, a Logger should extend [`AbstractLogger`](AbstractLogger.php), because it contains additional, Friendica specific business logic for each logging call.