Creates an event logger.
Inherits: Logger
Description
The EventLogger allows you to create an event logger.
Instance methods
Write
Writes a log message to the logger destination(s).
public override
void Write(LogLevel level, IContext context, Exception error, string message)
- level: LogLevel - a log level.
- context: IContext - (optional) a context to trace execution through a call chain.
- error: Exception - an error object associated with this message.
- message: string - a human-readable message to log.
Examples
var logger = new EventLogger();
logger.Level = LogLevel.Debug;
logger.Error("123", ex, "Error occured: %s", ex.Message);
logger.Debug("123", "Everything is OK.");