[reSIProcate] Log::initialize should take log level in upper or lower case (rutil)

John Gregg jgregg at aylus.com
Wed May 14 10:17:18 CDT 2014


In rutil/Log.cxx:

When application code initializes the logging system in resiprocate, it 
passes the log level (sensitivity) to Log::initialize() as a string. 
This string is translated to an internal Log::Level enum by 
Log::toLevel(). Log::toLevel() is smart about stripping a preceding 
"LOG_" (if present), but it demands that the string be upper case (it 
uses a straight strcmp() to compare with hardcoded strings in 
mDescriptions[]). People may want, e.g., to use strings from 
prioritynames[] in syslog.h under linux, which are lower-case. It seems 
we should accept "crit" just as much as "CRIT". This would be a simple 
change of strcmp => strcasecmp in Log::toLevel(). I don't see a downside.

I do not have permission to modify resiprocate code myself. Is this the 
proper way to feed suggestions into the community?

-John Gregg




More information about the resiprocate-devel mailing list