private static void WriteEntry(this IIsLoggable loggable, LogLevel level, Func <string> callback, Exception ex = null, Action <LogArgs> options = null) { var log = (Log)loggable.GetLog(); if (log.IsLevelEnabled(level)) { var buf = callback(); log.LogMessage(level, buf, ex, options); } }
public static void LogFatal(this IIsLoggable loggable, Func <string> callback, Exception ex = null, Action <LogArgs> options = null) { loggable.WriteEntry(LogLevel.Fatal, callback, ex, options); }
public static ILog GetLog(this IIsLoggable loggable) { return(LogManager.GetLogger(loggable.GetType())); }