Пример #1
0
 public void Debug(object message, Exception ex = null, object[] args = null)
 {
     if (LamdaLogger._debugLogger != null)
     {
         LamdaLogger._debugLogger(message, ex, args);
     }
 }
Пример #2
0
 public void Error(object message, Exception ex = null, object[] args = null)
 {
     if (LamdaLogger._errorLogger != null)
     {
         LamdaLogger._errorLogger(message, ex, args);
     }
 }
Пример #3
0
 public void Info(object message, Exception ex = null, object[] args = null)
 {
     if (LamdaLogger._infoLogger != null)
     {
         LamdaLogger._infoLogger(message, ex, args);
     }
 }
Пример #4
0
 public void Critical(object message, Exception ex = null, object[] args = null)
 {
     if (LamdaLogger._criticalLogger != null)
     {
         LamdaLogger._criticalLogger(message, ex, args);
     }
 }
Пример #5
0
 public LamdaLogger()
 {
     LamdaLogger._criticalLogger = delegate(object message, Exception ex, object[] args)
     {
         Console.WriteLine(LamdaLogger.BuildMessage("critical", message, ex, args));
     };
     LamdaLogger._errorLogger = delegate(object message, Exception ex, object[] args)
     {
         Console.WriteLine(LamdaLogger.BuildMessage("error", message, ex, args));
     };
     LamdaLogger._infoLogger = delegate(object message, Exception ex, object[] args)
     {
         Console.WriteLine(LamdaLogger.BuildMessage("info", message, ex, args));
     };
     LamdaLogger._debugLogger = delegate(object message, Exception ex, object[] args)
     {
         Console.WriteLine(LamdaLogger.BuildMessage("debug", message, ex, args));
     };
 }