Hi,
Just a quick question regarding Filters and log levels.
The documentation says that LogLevel.FromOrdinal returns:
The LogLevel instance. For 0 it returns Debug, 1 gives Info and so on
However the LogLevel constructor looks like this:
static LogLevel()
{
int num = 0;
Trace = new LogLevel("Trace", num++);
Debug = new LogLevel("Debug", num++);
Info = new LogLevel("Info", num++);
Warn = new LogLevel("Warn", num++);
Error = new LogLevel("Error", num++);
Fatal = new LogLevel("Fatal", num++);
Off = new LogLevel("Off", num++);
_levelByOrdinal = new LogLevel[] { Trace, Debug, Info, Warn, Error, Fatal, Off };
MinLevel = _levelByOrdinal[0];
MaxLevel = _levelByOrdinal[_levelByOrdinal.Length - 2];
}
Trace is added first to the _levelByOrdinal array which means it will have index 0.
and the FromOrdinal method looks like this:
Does this mean that FromOrdinal will actually return Trace when 0 is passed in?
Thanks,
Jonathan.
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list