public void WriteEntry(string msg, NeatLogLevel level, int eventId, ushort taskCategory, string eventSource) { ILoggerRepository repository = log4NetLog.Logger.Repository; string loggerName = log4NetLog.Logger.Name; Level log4netLevel = new Level((int)level, level.ToString()); LoggingEvent loggingEntry = new LoggingEvent(loggingType, repository, loggerName, log4netLevel, msg, null); loggingEntry.Properties["EventID"] = eventId; loggingEntry.Properties["TaskCategory"] = taskCategory; loggingEntry.Properties["EventSource"] = eventSource; log4NetLog.Logger.Log(loggingEntry); }
public void Log(NeatLogLevel loglevel, string formatStr, params object[] args) { try { if (CurrentLogLevel > loglevel) { return; } string finalMsg = GetFinalMessage(formatStr, args); WriteEntry(finalMsg, loglevel, 0, 0, string.Empty); } catch (Exception e) { string skipFxCop = e.Message; } }
private void WriteEntry(string msg, NeatLogLevel level, int eventId, ushort taskCategory, string eventSource) { loggerImp.WriteEntry(msg, level, eventId, taskCategory, eventSource); }