[Chilli] Switching logging mechanism in coova - need testers/feedback

David Bird dbird at google.com
Wed Jan 14 21:25:06 UTC 2015


I'm ok with it... others have opinions?  it might be nice, however, if
debug messages could be compiled out by a build-time option.

On Tue, Jan 13, 2015 at 5:21 PM, Sevan / Venture37 <venture37 at gmail.com>
wrote:

> On 13 January 2015 at 18:11, David Bird <dbird at google.com> wrote:
> > But, the existing log mechanism basically wraps syslog with the option of
> > also going to stdio... Also, the wrapping around syslog makes for a more
> > consistent format.
>
> The idea is
> 1) to remove the layers of abstraction to improve readability (easier
> to notice call to syslog rather than the variadic macro which calls a
> wrapper function which calls syslog function)
> 2) make it easier to find issues in code e.g.
> line 1381 of chilli.c
>
> log_dbg("RADIUS Request + Class(%d)", state->redir.classlen);
> This compiles without issue
>
> change it to
> syslog(LOG_DEBUG, "RADIUS Request + Class(%d)", state->redir.classlen);
>
> Turns out format specifies type 'int' but the argument has type 'size_t'
> Perform the test with clang, not GCC
> I have more examples if you require that are fixed in my branch by the
> switch.
>
> 3) bring things up to C99 standard instead of GNU99
>
> 4) dealing with stdout can be dealt with by syslog, there is a
> LOG_CONSOLE facility, I'll deal with this as a separate case once the
> codebase has been switched over.
>
>
> Sevan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20150114/5a146dfa/attachment.html>


More information about the Chilli mailing list