Hello, It is good idea to add %newline at the end of message pattern, otherwise two messages are mixed on single line Radovan
-----Původní zpráva----- Od: SEGERS Steven (CNH) [mailto:[email protected]] Odesláno: 16. září 2012 8:11 Komu: Log4NET User Předmět: RE: New to log4net. Easy question? Because you have a space in front of %exception. Best regards Steven -----Original Message----- From: DaneVinson [mailto:[email protected]] Sent: zondag 16 september 2012 6:48 To: [email protected] Subject: New to log4net. Easy question? /* Code */ protected static readonly ILog Logger = log4net.LogManager.GetLogger(typeof(Program)); static void Main(string[] args) { Logger.Info("Test line"); Logger.Info("Test line 2"); Logger.Info("Test line 3"); /* Appender */ <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date{ABSOLUTE} - %-5level - %message%newline %exception"/> </layout> </appender> /* Output */ 21:40:26,429 - INFO - Test line 21:40:26,441 - INFO - Test line 2 21:40:26,441 - INFO - Test line 3 Why the leading single space on every entry after the first? -- View this message in context: http://old.nabble.com/New-to-log4net.-Easy-question--tp34438289p34438289.html Sent from the Log4net - Users mailing list archive at Nabble.com.
