public static void WriteTo(string name, string info, Exception ex = null) { if (string.IsNullOrEmpty(name)) { name = "Complement"; } var lazy = new Lazy <Logger>(() => LogManager.GetLogger(name)); Logger customLog = _customLoggers.GetOrAdd(name, lazy.Value); if (customLog != null) { customLog.Log(LogLevel.Trace, LogHelper.BuildMessage(info, ex)); } }
private static string BuildMessage(string info) { return(LogHelper.BuildMessage(info, null)); }