Ability to add custom trace format/layout

Feb 11, 2011 at 3:44 PM

Hi,

What I really miss is that you can specify for any receiver the

format/layout of the traces so they can be properly parsed in the app.

It could be something like Regular expressions with well-known named groups.

Thanks.

May 13, 2011 at 10:34 PM

Me too! I found the default setting of XmlLayoutSchemaLog4j layout too limited, it doesn't show Method info for example. So i changed the layout to use the same spec I was using in the RollingFileAppender:

<layout type="log4net.Layout.PatternLayout">
        <conversionPattern value="%-5p %d{dd-MM-yyyy HH:mm:ss} %-22.22c{1} %-18.18M - %m%n" />
      </layout>

So that's how I set it in log4net but when I do that change the log2Console gets totally confused (I am using UDP Appender), it only gets the date right.

  • Instead of showing the actual level of the log message it shows INFO
  • Instead of showing the actual logger name it shows 127-0-0-1-UdpAppender
  • The thread shows NA
  • The message part shows "DEBUG 13-05-2011 17:25:03 rotectedItemCollection FromXml            - FromXml checking elements"

I am really missing this feature.

Feb 28, 2013 at 11:41 AM
Me too :)