[gccsdk] Syslog: DoggySoft vs. Unix

Alex Waugh alex at alexwaugh.com
Wed May 23 13:33:07 PDT 2007


Adam <lists at snowstone.org.uk> wrote:

> Hi All,
> 
> Having been reading Graham Shaw's new book on UnixLib, I've been fiddling
> with the GCC implimentation of syslog (in the past I've used the RISC OS
> syslog SWIs). How are the different priority schemes rationalised? For
> instance, the DoggySoft help file says:
> 
>   Day-to-day information should probably be logged at around level 100.
>   Certainly avoid levels of less than around 50 for non-critical messages.
>   Level 10 means that the message is of similar importance to "Government
>   declares war". Level 0 is of similar importance to "Armageddon imminent."
>   Level 255 is of similar importance to "Water detected in ocean". The
>   logging output of your program is much more useful if prorities are
>   used well.
>   
> Looking at the logs on my RISC OS system, this seems to be the scheme
> used but, for example,   LOG_USER | LOG_INFO   generates a log message
> of level 14 - which must map to something like "computer on fire"
> under the DoggySoft/RISC OS scheme.
> 
> Is there some way of rationalising the two which I've missed, or am I
> just going about things the wrong way?

The syslog code in UnixLib is derived from the BSD code, and so uses the
same priorities as BSD. This limits the number of priorities available.

Alex

-- 
Alex Waugh                                           alex at alexwaugh.com

PHP, Roots, Subversion, WebJames and more from http://www.alexwaugh.com/




More information about the gcc mailing list