public void Debug(object message, Exception ex = null, object[] args = null) { if (LamdaLogger._debugLogger != null) { LamdaLogger._debugLogger(message, ex, args); } }
public void Error(object message, Exception ex = null, object[] args = null) { if (LamdaLogger._errorLogger != null) { LamdaLogger._errorLogger(message, ex, args); } }
public void Info(object message, Exception ex = null, object[] args = null) { if (LamdaLogger._infoLogger != null) { LamdaLogger._infoLogger(message, ex, args); } }
public void Critical(object message, Exception ex = null, object[] args = null) { if (LamdaLogger._criticalLogger != null) { LamdaLogger._criticalLogger(message, ex, args); } }
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)); }; }