3.25.4. AcctLogFileName Previous topic Parent topic Child topic Next topic

The names of the files used to log Accounting-Request messages in the standard radius accounting log format. All Accounting-Request messages will be logged to the files, regardless of their Acct-Status-Type. For more information about log file format, see Section 9.5. Accounting log file. If no AcctLogFileName is defined, accounting messages will not be logged for this realm. The default is no logging. The file name can include special formatting characters as described in Section 3.1. Special characters, which means that using the %C, %c and %R specifiers, you can maintain separate accounting log files for each Realm or Client or a combination. The AcctLogFileName files are always opened written and closed for each message, so you can safely rotate them at any time.
If the AuthBy module you select does no special accounting logging, you may want to enable this parameter for the Realm. Note that logging to AcctLogFileName is in addition to any recording that a specific AuthBy module might do (such as, say, AuthBy SQL). The user name that is recorded in the log file is the rewritten user name when RewriteUsername is enabled.
You can specify any number of AcctLogFileName parameters. Each one will result in a separate accounting log file.
If the file name starts with a vertical bar character (‘|’) then the rest of the filename is assumed to be a program to which the output is to be piped. Otherwise the output will be appended to the named file:
# Pipe to my-log-prog
AcctLogFileName |/usr/local/bin/my-log-prog
Tip
You can change the logging format with AcctLogFileFormat:
# Log all accounting to a single log file in LogDir
AcctLogFileName %L/details