logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pascal ROZE" <pascal.r...@gmail.com>
Subject Use Pattern name in message
Date Thu, 28 Aug 2008 12:44:44 GMT
Hi all

At this time, I have a logger with the following configuration:
<layout type="log4net.Layout.PatternLayout,log4net">
      <conversionPattern value="LEVEL: %level %newlineDATE: %date
%newlineLOGGER: %logger %newline%newline%message"/>
    </layout>

It works fine.


Now, I would like to use Pattern names in message variable.

For example, I'm trying to do:

string msg = "The time is %date and the logger is %logger";
myLogger.Info(msg);

And of course, it doesn't work.
The output is: The time is %date and the logger is %logger.

Any idea to achieve that?

Thx a lot

Pascal

Mime
View raw message