Linelog fails when attribute does not exist

R3DNano r3dnano at gmail.com
Mon Jul 29 21:03:34 CEST 2019


 Sorry,  yeah, I meant fail, not crash: you're right.

I completely forgot I could default to anything else.

Thanks fort the reply!!

On Mon, Jul 29, 2019 at 8:28 PM Alan DeKok <aland at deployingradius.com>
wrote:

> On Jul 29, 2019, at 2:17 PM, R3DNano <r3dnano at gmail.com> wrote:
> >
> > I'm tryin to implement linelog so I can send information to a remote
> syslog
> > server.
> > It seems to work perfectly unless I try to send an attribute that is not
> > defined or used at the time.
> > For this reason, the linelog module fails to send any data.
> > Is there any way to make it default to something else like an empty value
> > so it does not crash instead?
>
>   It shouldn't *crash*.  It should just fail.
>
>   See "man unlang".  You can use optional expansions:
>
>         %{%{User-Name}:-?}
>
>   Will expand to %{User-Name} if it exists, otherwise to "?"
>
>   Alan DeKok.
>
>
> -
> List info/subscribe/unsubscribe? See
> http://www.freeradius.org/list/users.html


More information about the Freeradius-Users mailing list