3.112. <AcctLog SQL>

This clause logs accounting requests to an SQL database. You can define as many AcctLog SQL clauses as you wish at the top level or within Realm or Handler clauses. Each clause can specify different logging conditions and a different log file.
<AcctLog SQL> supports all the common SQL configuration parameters. For more information about the SQL configuration parameters, see Section 3.8. SQL configuration.
For an AcctLog SQL configuration sample, see goodies/sql.cfg file in the Radiator distribution.

3.112.1. LogQuery

This string defines the SQL query that logs the authentication successes. It is an optional parameter and has no default value. You can use special characters. For more information, see Section 3.3. Special formatters. If it is not defined, accounting is not logged at all.
The bind variables are replaced as follows:
  • %0: the result
  • %1: the quoted reason string, usually this is empty if successful
  • %2: the SQL-quoted User-Name
  • %3: the SQL-quoted original user name from the incoming request (before any RewriteUsername rules were applied)
  • %4: the tracing identifier string

3.112.2. LogQueryParam

This string array enables the use of bound variables, if they are supported by the SQL server, and query caching. This is an optional parameter. When one or more LogQueryParameters are defined, they are used to replace parameter names with question marks in LogQuery and the query is cached in the SQL server for future reuse. Only the first QueryCacheSize is cached.