logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Hinkley <rosshink...@gmail.com>
Subject Re: Controlling the log message format
Date Tue, 11 May 2010 17:07:25 GMT
This should be controllable via the conversionPattern.  Something like the
following in your appender, maybe?

<layout type="log4net.Layout.PatternLayout">
     <conversionPattern value="%date %-5level - %message%newline" />
</layout>

-Ross


On Tue, May 11, 2010 at 11:58 AM, Steven Whatmore <
Steven.Whatmore@purefacts.com> wrote:

> Good morning,
>
> I would like to be able to control the format of the message, removing the
> initial prefix
>
> As an example if the format of my message is:
>
>        com.pf.util.implementation.AppConfigurationImpl: 2010-05-11
> 12:50:05,466 DEBUG [9] com.pf.util.implementation.AppConfigurationImpl -
> handling sessionStart event
>
> I would like to remove the initial
> "com.pf.util.implementation.AppConfigurationImpl" part resulting in:
>
> 2010-05-11 12:50:05,466 DEBUG [9]
> com.pf.util.implementation.AppConfigurationImpl - handling sessionStart
> event
>
> I have tried it through configuration but can't seem to control the prefix
>
> I took a quick look through the code and as far as I can tell this is not
> configurable.
>
> Am I correct?
>
> Whatty
>

Mime
View raw message