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

Sevan / Venture37 venture37 at gmail.com
Wed Jan 14 01:21:17 UTC 2015

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.


More information about the Chilli mailing list