<AuthLog FILE>
clauses as you need to at the top level or within the Realm or Handler
clauses. Each clause can specify different logging conditions and a
different log file.<AuthLog
FILE>
:# This auth logger logs both success and failure to a file. It # also log authentications that are ignored. <AuthLog FILE> Identifier myauthlogger Filename %L/authlog LogSuccess 1 LogFailure 1 LogIgnore 1 </AuthLog> <Realm DEFAULT> <AuthBy FILE> Filename %D/users </AuthBy> # Log authentication results to a file AuthLog myauthlogger </Realm>
<AuthLog FILE>
understands also the same
parameters as all AuthLogs. For more information, see Section 3.104. <AuthLog xxxxxx>.%L/password.log
. Special character %0 is replaced by
the result of the authentication and %1 by the reason string.# Pipe to my-log-prog Filename |/usr/local/bin/my-log-prog
%l:%U:%P:OK
. This logs time stamp in long format, current
User-Name, decoded password and text OK.%l:%U:%P:FAIL
.
This logs time stamp in long format, current User-Name, decoded password
and text FAIL.%l:%U:%P:IGNORE
. This logs time
stamp in long format, current User-Name, decoded password and text
IGNORE.SuccessFormat
and
FailureFormat
are used for formatting. The hook
parameters are the message severity level, the reason string, a reference
to the current request a tracing identifier string.LogFormatHook
:
# This auth logger logs both success and failure to a file in # JSON format. The JSON Perl module must be installed. <AuthLog FILE> Identifier myauthlogger-json Filename %L/authlog.json LogFormatHook sub { Radius::LogFormat::format_authlog_json(@_); } LogSuccess 1 LogFailure 1 </AuthLog>
goodies/logformat.cfg
.Cpanel::JSON::XS
or JSON::XS
for
higher performance JSON encoding.