You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by "Morgan, Carey" <Ca...@jenzabar.net> on 2008/12/19 22:58:07 UTC

stopping messages to standard out in console app

I am using log4net in my .NET 3.5 console application and would like the log messages I generate to be seen in both the console standard out and the RollingFileAppender. The file output is working like a charm, but I am seeing a stream of status messages flowing to the console standard out when I execute. I would like to skip all the status information and only see the same messages I am programmatically generating to the log file.

Here is an example of what I see after I run my app:
log4net: XmlHierarchyConfigurator: Configuration update mode [Merge].
log4net: XmlHierarchyConfigurator: Logger [root] Level string is [DEBUG].
log4net: XmlHierarchyConfigurator: Logger [root] level set to [name="DEBUG",value=30000].
log4net: XmlHierarchyConfigurator: Loading Appender [Console] type: [log4net.Appender.ConsoleAppender]
log4net: PatternParser: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: PatternParser: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
log4net: XmlHierarchyConfigurator: Setting Property [ConversionPattern] to String value [%5level [%thread] (%file:%line) - %message%newline]
log4net: PatternParser: Converter [level] Option [] Format [min=5,max=2147483647,leftAlign=False]
log4net: PatternParser: Converter [literal] Option [ [] Format [min=-1,max=21474
....

How do I turn this stuff off? I have searched for everything I can find on the subject and cannot pin it down.

Thanks,

Carey

Re: stopping messages to standard out in console app

Posted by Daniel Marohn <ma...@sipgate.de>.
Hey Carey,

what you see is the internal log4net logging.

see
http://logging.apache.org/log4net/release/faq.html
section 'How do I enable log4net internal debugging?'

2008/12/19 Morgan, Carey <Ca...@jenzabar.net>:
> I am using log4net in my .NET 3.5 console application and would like the log messages I generate to be seen in both the console standard out and the RollingFileAppender. The file output is working like a charm, but I am seeing a stream of status messages flowing to the console standard out when I execute. I would like to skip all the status information and only see the same messages I am programmatically generating to the log file.
>
> Here is an example of what I see after I run my app:
> log4net: XmlHierarchyConfigurator: Configuration update mode [Merge].
> log4net: XmlHierarchyConfigurator: Logger [root] Level string is [DEBUG].
> log4net: XmlHierarchyConfigurator: Logger [root] level set to [name="DEBUG",value=30000].
> log4net: XmlHierarchyConfigurator: Loading Appender [Console] type: [log4net.Appender.ConsoleAppender]
> log4net: PatternParser: Converter [message] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: PatternParser: Converter [newline] Option [] Format [min=-1,max=2147483647,leftAlign=False]
> log4net: XmlHierarchyConfigurator: Setting Property [ConversionPattern] to String value [%5level [%thread] (%file:%line) - %message%newline]
> log4net: PatternParser: Converter [level] Option [] Format [min=5,max=2147483647,leftAlign=False]
> log4net: PatternParser: Converter [literal] Option [ [] Format [min=-1,max=21474
> ....
>
> How do I turn this stuff off? I have searched for everything I can find on the subject and cannot pin it down.
>
> Thanks,
>
> Carey
>



-- 
Daniel Marohn - marohn@sipgate.de
Telefon: +49 (0)211-63 55 55-0
Telefax: +49 (0)211-63 55 55-22
sipgate GmbH - Gladbacher Str. 74 - 40219 Düsseldorf
HRB Düsseldorf 39841 - Geschäftsführer: Thilo Salmon, Tim Mois
Steuernummer: 106/5724/7147, Umsatzsteuer-ID: DE219349391
www.sipgate.de - www.sipgate.at - www.sipgate.co.uk