public static int GetLoggerLevel(string loggerName) { TracingLevel level = TracingConfiguration._currentLevel; int levelLength = 0; return(level._levelValue); }
private void WriteLog(TracingLevel level, string message) { TracingEvent logEvent = new TracingEvent(); logEvent.Message = message; logEvent.LoggerName = _loggerName; logEvent.Level = level; DoAppend(logEvent); }
public void InfoFmtSip(string from, string to, string callId, string cseq, string message, params object[] args) { try { if (TracingLevel.CanLogInfo(this)) { WriteLog(TracingLevel.Info, string.Format(message, args), from, to, callId, cseq); } } catch (Exception ex) { Trace.Write(ex); } }
public void InfoFmtEx(Exception exception, string message, params object[] args) { try { if (TracingLevel.CanLogInfo(this)) { WriteLog(TracingLevel.Info, string.Format(message, args), exception); } } catch (Exception ex) { Trace.Write(ex); } }
public void Info(string from, string to, string callId, string cseq, Exception exception, string message) { try { if (TracingLevel.CanLogInfo(this)) { WriteLog(TracingLevel.Info, message, exception, from, to, callId, cseq); } } catch (Exception ex) { Trace.Write(ex); } }
public void Info(Exception exception, string message) { try { if (TracingLevel.CanLogInfo(this)) { WriteLog(TracingLevel.Info, message, exception); } } catch (Exception ex) { Trace.Write(ex); } }
public void ErrorFmt(string message, params object[] args) { try { if (TracingLevel.CanLogError(this)) { WriteLog(TracingLevel.Error, string.Format(message, args)); } } catch (Exception ex) { Trace.Write(ex); } }
public void Error(Exception exception, string message) { try { if (TracingLevel.CanLogError(this)) { WriteLog(TracingLevel.Error, message, exception); } } catch (Exception ex) { Trace.Write(ex); } }
public void Warn(Exception exception, string message) { try { if (TracingLevel.CanLogWarn(this)) { WriteLog(TracingLevel.Warn, message, exception); } } catch (Exception ex) { Trace.Write(ex); } }
public void Warn(string from, string to, string callId, string cseq, string message) { try { if (TracingLevel.CanLogWarn(this)) { WriteLog(TracingLevel.Warn, message, from, to, callId, cseq); } } catch (Exception ex) { Trace.Write(ex); } }
private void WriteLog(TracingLevel level, string message, string from, string to, string callId, string cseq) { TracingEvent logEvent = new TracingEvent(); logEvent.Message = message; logEvent.LoggerName = _loggerName; logEvent.Level = level; logEvent.From = from; logEvent.To = to; logEvent.CallId = callId; logEvent.Cseq = cseq; DoAppend(logEvent); }
static TracingConfiguration() { try { _defaultConfig = (TracingConfigSection)ConfigurationManager.GetSection("LoadingSkyLog"); if (_defaultConfig == null) { _defaultConfig = Activator.CreateInstance <TracingConfigSection>(); } } catch { _defaultConfig = Activator.CreateInstance <TracingConfigSection>(); } _currentLevel = TracingLevel.GetLogLevel(_defaultConfig.Level); }
internal static bool CanLog(TracingLevel level) { return(level._levelValue >= TracingConfiguration._currentLevel._levelValue); }