Hi everybody,

There is some undergoing work on the logging system in OpenSER and I feel that some issues should be publicly addressed before moving forward.

What we have now in openser:
   1) two logging systems - syslog and standard error
   2) message format - totally chaos.

What we want to fix:
1) a better way to make easy distinction between the logs from different levels (ERR, WARN, DBG, etc) 2) a standard message format that, independend of the logging support (syslog, stderr), will provide all the needed information (level and date at least).


Here is my suggestion:

1) logging and message format:
There will be different macros for each log level and the message should include the module_name and function for a better tracking of the messages:

   LOG_NOTICE("module_name:function: message")
   LOG_DBG("module_name:function: message")
   LOG_ERR("module_name:function: message")
   ......


2) logging backends:
   a) syslog
syslog automatically logs the date, process and from syslog.conf, you can redirect the log in different files based on the log level, so here there is nothing to be changed.
   b) stderr
we need to extend dprint() (logger function for stderr) to prefix to the log message the date and log level (as text). This will provide similar possibilities as for syslog. (a patch is already available for this on the tracker)



If there are some comments on the proposed solution or there is a better approach, please let me know as I want to move on with this topic.


Regards,
Bogdan

_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users

Reply via email to