[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A logging hook functions should be declared as follows:
Type of the request. It can be converted to string using
request_code_string
function (see section Rewrite Built-in Functions).
NAS identifier from ‘raddb/naslist’, or its host name if not declared there
Request identifier.
Notice that the hook function shall not produce any side effects, in particular it shall not modify the incoming request in any way.
Following is an example prefix hook function that formats the incoming request data:
string compat_log_prefix(integer reqtype, string nas, integer id) { string result; return "(" + request_code_string(reqtype) + " " + nas + " " + (string)id + " " + %[User-Name] + ")"; } |
Here is a sample log produced by radiusd
before and after
enabling this function:
|
This document was generated by Sergey Poznyakoff on December, 6 2008 using texi2html 1.78.