[OpenSER-Devel] SF.net SVN: openser: [4261] trunk/modules/presence/notify.c
Henning Westerholt
henning.westerholt at 1und1.de
Fri May 30 12:59:33 CEST 2008
On Friday 30 May 2008, Bogdan-Andrei Iancu wrote:
> I tend to agree with Henning here - after all everything reduces to how
> you configure your logging levels. For example, you could use L_WARNING
> for your script. After all we cannot make distinction between what is
> logged from code and what from script, but there is a need for booth.
>
> Maybe for solving this we could downgrade the log from C code to
> NOTICE......just an idea...
Hi Bogdan,
i don't think this is a good way to solve this. An easy way to seperate the
log messages generated from the script to the ones from the server would be
just to add a prefix.
Ok, i'll try to give each log levels a meaning:
DBG:
used only for debugging, don't need to be understandable from users, provide
an insight into the inner working of the server, e.g. memory management,
parsing, state of internal module function
INFO:
used for informational messages that are emmited during normal operation,
should be understandable from users, to give an indicator about the performed
operations of the server, e.g. proceeded messages, routing descisions,
startup informations
NOTICE:
used for informational messages that are generated during abnormal, but not
critical operation conditions
WARN:
used for warning messages that are emmited during abnormal and less critical
operation conditions, for example a file could not found and an empty module
configuration will be used, a required part of a message is missing and the
code tries to continue with some degration
ERR:
used for error messages that clearly indicates a problem, but this could be
handled in the server, e.g. memory allocation error, failure to access the
database, network error
CRIT:
used for critical messages that clearly indicates a problem, which could not
be easily handled in the server
ALERT:
used for conditions which could be handled from the server, and will lead to a
shutdown or crash.
I think perhaps one or two levels are superfluos here. NOTICE is not that much
used, and i had a hard time to seperate this from the INFO and WARN. ALERT is
also not much used, and i also think the existing callers could just use the
CRIT level. What do you think, perhaps this is something for 1.5?
Cheers,
Henning
More information about the Devel
mailing list