Documentation for #2565

This commit is contained in:
Maxime Besson 2021-10-08 14:01:22 +02:00
parent 9fb3e2422f
commit 004810b18b
2 changed files with 26 additions and 3 deletions

View File

@ -210,7 +210,30 @@ Default values:
log4perlConfFile = /etc/log4perl.conf
log4perlLogger = LLNG
log4perlUserLogger = LLNG.user
log4perlUserLogger = LLNGuser
Sample ``log4perl.conf`` file
.. code::
log4perl.logger.LLNG = DEBUG, Syslog
log4perl.logger.LLNGuser = INFO, Syslog
log4perl.appender.Syslog = Log::Dispatch::Syslog
log4perl.appender.Syslog.ident = LLNG
log4perl.appender.Syslog.layout = PatternLayout
log4perl.appender.Syslog.layout.ConversionPattern = [%p] %m
For additional information, please read the `Log4Perl documentation <https://metacpan.org/pod/Log::Log4perl>`__
.. versionadded:: 2.0.14
The following special formatters have been added to standard `PatternLayout placeholders <https://metacpan.org/pod/Log::Log4perl::Layout::PatternLayout>`__
* ``%Q{address}``: IP address of the request
* ``%Q{user}``: Username of the current user
* ``%Q{id}``: Session ID of the current user
* ``%E{ENV_VAR}``: content of the ``ENV_VAR`` variable
Sentry
~~~~~~

View File

@ -80,12 +80,12 @@ logLevel = warn
;logger = Lemonldap::NG::Common::Logger::Log4perl
;log4perlConfFile = /etc/log4perl.conf
;log4perlLogger = LLNG
;log4perlUserLogger = LLNG.user
;log4perlUserLogger = LLNGuser
;
; Here, Log4perl configuration is read from /etc/log4perl.conf. The "LLNG"
; value points to the logger class. Example:
; log4perl.logger.LLNG = WARN, File1
; log4perl.logger.LLNG.user = INFO, File2
; log4perl.logger.LLNGuser = INFO, File2
; ...
; CONFIGURATION CHECK