protected override async Task OnWriteMessageAsync(LoggingMessage message) { var msg = message.ToString(); switch (Level) { case StandardLevels.Critical: _l4nLogger.Fatal(msg); break; case StandardLevels.Important: _l4nLogger.Error(msg); break; case StandardLevels.Warning: _l4nLogger.Warn(msg); break; case StandardLevels.Infomation: _l4nLogger.InfoFormat(msg); break; case StandardLevels.Debug: _l4nLogger.Debug(msg); break; default: break; } await Task.Yield(); }
protected override async Task OnWriteMessageAsync(LoggingMessage message) { var msg = message.ToString(); el.WriteEntry(Name, msg, EventLogEntryType); await Task.Yield(); }