Monday, May 21, 2012
 
The best way to analyze your logs! Minimize
 Log4Net Mail archive   

The Log4Net mailing list is a great source of information about using log4Net, in this forum we collect all the messages in the log4net user list and some selected threads from the developer list.

Subject: Printing a log message of level 'ALL'
Prev Next
You are not authorized to post a reply.

Author Messages
Vitaliy

11/09/2008 10:36 AM  

Hi,

 

In some cases I would like to print messages to the log of my application,

At a level lower than ‘DEBUG’.

 

I’ve noticed in the documentation that the level ‘ALL’ should do it,

But I failed to find a way to print messages for this level.

For instance ILog interface has methods for printing messages of levels: ‘DEBUG’, ‘INFO’, ‘WARN’, ‘ERROR’, ‘FATAL’,

But none for the level ‘ALL’.

 

What’s the obvious I’m missing?

Is there any other built-in way to print to ‘ALL’,

Or should I extend that interface, and implement it myself?

 

I would really appreciate any help,

Vitaliy

Dag Christensen

11/09/2008 12:12 PM  

You can invoke log.Logger.Log passing log4net.Core.Level.Verbose as the log level.

 

Levels in log4net are integers in increasing order. If the level of your log event is equal to or higher than your logger’s level the event will be passed on to its appenders. Level.All equals int.MinValue, Level.Verbose.Value= 10000, Level.Debug.Value= 30000 etc. Level.Off (int.MaxValue) disables all logging.

 

Hope this helps,

 

Dag

 


Dag Christensen
Senior Developer, Visma Retail AS

Switchboard : +47 33 34 94 00


 

Vitaliy

11/09/2008 7:32 PM  

Thanks!

 

That did it.

 

Vitaliy

 

You are not authorized to post a reply.
Forums > Log4Net > Log4Net Mail archive > Printing a log message of level 'ALL'



ActiveForums 3.7

 

 

 

 

 

 

 

 

Log4Net Dashboard

Log analysis and monitoring made easy!

Log4Net Dashboard is a log viewer that can read log statements from a variety of logging output targets.

You can download a free developer version.

  

Check it out!

On the demonstration site you can try it  with live data.demo.l4ndash.com - Try Log4Net Dashboard with live data

The mail archive is a copy of all the mail sent to the mail address: log4net-user@logging.apache.org, organized as a forum.

If you would like to participate in the mail list, send a mail to log4net-user-subscribe@logging.apache.org.

More information about the mailing list is available on: http://logging.apache.org/log4net/support.html

 

A complete topic list is available and can be viewed here (warning, it takes some time to load)

 

Copyright 2005-2008 by FaktNet AS Terms Of Use Privacy Statement