Hi,log implementation is updated to have the following methods. and these methods take variable number of arguments (work just like printf,sprintf, etc). now you don't need to do a sprintf to create the string and pass it to log write method. Pls review and commit if useful.
AXIS2_F_LOG_DEBUG AXIS2_F_LOG_INFO AXIS2_F_LOG_ERROR AXIS2_F_LOG_WARNING AXIS_F_LOG_CRITICAL(for performance reasons and convenience, instead of using a switch, seperate methods are written for different log levels)
All these takes similar set of arguments (log,__FILE__,__LINE__,formated string) e.g.: AXIS2_F_LOG_INFO(log,__FILE__,__LINE__,"my info %s %d","test",1); this would log [info] xxx.c(nn) my info test 1 files in the patch: modules/util/log.c modules/util/axis2_log_default.h include/axis2_log.h3 booleans are defined to independently on/off debug/info/warning logs. (log_level parameter may be removed if we go for this scheme. AXIS2_LOG_WRITE macro works as it used to, but prints the file name and line number transparently.
TODO (suggestions): read log configuations from an xml file
implement AXIS2_F_LOG_XML(log obj ,xml obj, formated string)
using a file descriptor instead of stderr (2) and keeping
previous log when the app restarts
Thanks - Nabeel
patch_log.tar.gz
Description: GNU Zip compressed data
