This optional parameter allows you to change the way Radiator
formats accounting log JSON output by mapping RADIUS attributes to JSON
fields. Multi-valued RADIUS attributes are added as a JSON array. When
this parameter is not defined, all RADIUS attributes are encoded. The
general format is:
AcctLogOutputDef jsonattributename[,radiusattributename]
If
radiusattributename
is omitted,
jsonattributename
is used as RADIUS attribute name.
Special variables, such as %n, can also be used in
radiusattributename
. Note that in this case % must be the
first character in the radiusattributename
.
For
extensive customisation of JSON and other formats, see
LogFormatHook
and
Radius::LogFormat
module. For a configuration sample,
see
goodies/logformat.cfg
file in the Radiator
distribution.
# Use JSON and define what we want in the JSON output
OutputFormat json
# Use RADIUS attribute as JSON field name
AcctLogOutputDef Connect-Info
# Map attribute to JSON field
AcctLogOutputDef Custom-Event-Timestamp, Event-Timestamp
# Use special variables
AcctLogOutputDef Custom-Original-Username, %u
AcctLogOutputDef Custom-User-Name, %n