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

reiner otto augustus_meyer at yahoo.de
Wed Jan 14 22:00:50 UTC 2015

>it might be nice, however, if debug messages could be compiled out by a build-time option.<Good idea. But then just enable all compile time options by default. This would help avoiding bad suprises, when a useful option needs recompiling on openwrt, for example.Only somebody, who badly needs to save a few bytes, has to recompile.

     David Bird <dbird at google.com> schrieb am 22:25 Mittwoch, 14.Januar 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.


Chilli mailing list
Chilli at coova.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.coova.org/pipermail/chilli/attachments/20150114/48ec7f8b/attachment.html>

More information about the Chilli mailing list