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.
| 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. |
|
|
|
ActiveForums 3.7
|