xmlconfigurator

Log4Net EventLogAppender Not Logging To Custom Event Log

纵饮孤独 提交于 2019-12-19 06:45:23
问题 Added an EventLogAppender as follows: <appender name="eventLogAppender" type="log4net.Appender.EventLogAppender,log4net" > <mapping> <level value="ERROR" /> <eventLogEntryType value="Error" /> </mapping> <mapping> <level value="DEBUG" /> <eventLogEntryType value="Information" /> </mapping> <mapping> <level value="INFO" /> <eventLogEntryType value="Information" /> </mapping> <mapping> <level value="WARN" /> <eventLogEntryType value="Warning" /> </mapping> <logName value="NewLogName" />

log4net initialisation

大兔子大兔子 提交于 2019-12-17 16:27:03
问题 I've looked hard for duplicates but have to ask the following, no matter how basic it may seem, to get it clear once and for all! In a fresh Console app using log4net version 1.2.10.0 on VS28KSP1 on 64 bit W7, I have the following code:- using log4net; using log4net.Config; namespace ConsoleApplication1 { class Program { static readonly ILog _log = LogManager.GetLogger(typeof(Program)); static void Main(string[] args) { _log.Info("Ran"); } } } In my app.config , I have: <?xml version="1.0"

log4net initialisation

纵饮孤独 提交于 2019-11-27 22:43:12
I've looked hard for duplicates but have to ask the following, no matter how basic it may seem, to get it clear once and for all! In a fresh Console app using log4net version 1.2.10.0 on VS28KSP1 on 64 bit W7, I have the following code:- using log4net; using log4net.Config; namespace ConsoleApplication1 { class Program { static readonly ILog _log = LogManager.GetLogger(typeof(Program)); static void Main(string[] args) { _log.Info("Ran"); } } } In my app.config , I have: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config