Tuesday, August 10, 2021

Lo4Net - Insert Header (another approach)

 Temporary change the layout to display only the message.


ie:

ILayout configurationLayout = appender.Layout;

appender.Layout = new PatternLayout("%message");

myLogger.Info(MyHeader()); //MyHeader() returns any formated text you want to show.

appender.Layout = configurationLayout;

No comments:

Post a Comment

Stats


View My Stats

Contributors