c# - How to use LOG4NET for specific events -
c# - How to use LOG4NET for specific events -
hi learning log4net , stuck @ something
i using info(...)
write log files, need utilize info(...)
email in specific events.
so 1 phone call info(...)
writes log , and sends email.
probably best way accomplish add filter smtp appender: stringmatchfilter best bet.
there illustration of using stringmatchfilter smtpappender @ http://maonet.wordpress.com/2012/01/06/use-log4net-filter-to-dispatch-email-notification-based-on-string-match
the author notes:
filter type set log4net.filter.stringmatchfilter each filter section can have 1 stringtomatch element end “log4net.filter.denyallfilter” filter switch default “accept unless instructed otherwise” filtering behavior “deny unless instructed otherwise” behavior. c# log4net
Comments
Post a Comment