logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaeney <stevehae...@yahoo.co.uk>
Subject RE: Newbie: Does Log4Net have the concept of "Topics" and, if so, can I route messages based on topic rather than "Class" hierarchy?
Date Thu, 25 Oct 2007 07:27:01 GMT



Steve,

If I understand correctly, just have multiple loggers. Perhaps the
"per-class" logger for general diagnostics an trace, and then a more
global "audit" logger you use to write your audit information. You could
use different storage for the two or use the same storage. If you're
using the same storage there is nothing special needed. If you want
different storage you'd simply add an appender to the config file entry
for the "audit" logger specifically.

-Walden
Thanks Walden,

OK, so I understand that I can configure my different loggers with different
storage. I guess that the default logger behaviour is to NOT throw any
exceptions generated when logging back up the stack, in order to isolate the
program from failure. However, in the case of audit logs, I need to be able
to guarantee that the audit log was written to at least one appender (
possible ALL appenders configured for the audit purpose). Is this possible?

Also, further investigation suggests that I would have to encode any
additional meta-data into the log message string as there is no comparable
functionality to the MS Logging Application Block context attributes
collection?

Cheers,
Steve
-- 
View this message in context: http://www.nabble.com/Newbie%3A-Does-Log4Net-have-the-concept-of-%22Topics%22-and%2C-if-so%2C-can-I-route-messages-based-on-topic-rather-than-%22Class%22-hierarchy--tf4683548.html#a13401582
Sent from the Log4net - Users mailing list archive at Nabble.com.


Mime
View raw message