[reSIProcate] rutil Log: give app control over syslog facility; don't hardcode LOCAL6
John Gregg
jgregg at aylus.com
Tue May 20 13:25:13 CDT 2014
When I use the Log object to send logs to the syslog, the facility is
hardcoded to LOG_LOCAL6 in SysLogBuf.cxx. Our app would rather use
LOG_LOCAL0, given the filter we like to use in rsyslog. Rather than
hardcode it to our preferred value, I have made it settable by the app.
This entailed adding the new optional argument to Log::initialize, and
down through the ThreadData object, then to SysLogStream and finally to
SysLogBuf. The idea is quite simple, the messy part is all that new
parameter passing, along with proper #ifdef WIN32. I didn't test with
WIN32, but it should work OK, harmlessly ignoring the new facility.
The enclosed diffs are against the 1.9.6 versions in rutil.
-John Gregg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.cxx.diff
Type: text/x-patch
Size: 5451 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.hxx.diff
Type: text/x-patch
Size: 6773 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysLogBuf.cxx.diff
Type: text/x-patch
Size: 670 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysLogBuf.hxx.diff
Type: text/x-patch
Size: 476 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysLogStream.cxx.diff
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SysLogStream.hxx.diff
Type: text/x-patch
Size: 374 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20140520/0b0738a8/attachment-0005.bin>
More information about the resiprocate-devel
mailing list