Hi,

I made my own instance of linelog and configured it just like the default,
i.e. it has:

        format = "..."
        reference = "%{%{Packet-Type}:-format}"
        Accounting-Request {
                Start = "..."
                unknown = "..."
        }

However, I'm not getting the Accounting-Request block interpreted at all,
it just reverts to the format variable. As a workaround I set it to:
        format = "%S This is a log message for %{User-Name} for packet type: 
%{Packet-Type} (%{request:Acct-Status-Type})" 
and I get this at debug level 2:

[myownlittle_linelog]       expand: %{Packet-Type} -> Accounting-Request
[myownlittle_linelog]       expand: %{%{Packet-Type}:-format} -> 
Accounting-Request
[myownlittle_linelog] Entry ".Accounting-Request" is not a variable assignment 
[myownlittle_linelog]       expand: /var/log/freeradius/linelog -> 
/var/log/freeradius/linelog
[myownlittle_linelog]       expand: %S This is a log message for %{User-Name} 
for packet type: %{Packet-Type} (%{request:Acct-Status-Type}) -> 2009-11-25 
02:17:02 This is a log message for [email protected] for packet type: 
Accounting-Request (Start)
++[myownlittle_linelog] returns ok

AFAICT from reading rlm_linelog.c, that looks like cf_reference_item()
worked, but cf_item_is_pair() didn't. Well, that actually makes perfect
sense. Just to verify, I added:

        if (cf_item_is_section(ci)) {
                radlog(L_ERR, "Entry \"%s\" is a section and we expected a 
plain variable", line);
        }

And I got that logged.

Aren't we missing a critical block of code here? :)

-- 
     2. That which causes joy or happiness.
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to