[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freeradius-users
Subject:    Re: Linelog fails when attribute does not exist
From:       R3DNano <r3dnano () gmail ! com>
Date:       2019-07-29 19:03:34
Message-ID: CACa3q1yvxUPVhnbp5BGN-0vkbxVE5te1v1y2F-TYE3V-EXy3ug () mail ! gmail ! com
[Download RAW message or body]

 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@deployingradius.com>
wrote:

> On Jul 29, 2019, at 2:17 PM, R3DNano <r3dnano@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
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic