Example #1
0
        public static void Init(string savePath = null, params string[] moduleNames)
        {
            var list = moduleNames.ToList();

            list.Add(DefaultModuleName);
            NLogProxy.Init(savePath, list);
            foreach (var m in moduleNames)
            {
                Info(m, "----------- [Start] -----------");
            }
        }
Example #2
0
        private static string Format <TState>(TState state, Exception e)
        {
            string s = $"{state} {NLogProxy.GetException(e)}";

            return(s);
        }
Example #3
0
 public static void Fatal(string moduleName, string msg, Exception ex = null)
 {
     NLogProxy.Write(moduleName, LogLevel.Fatal, msg, ex);
 }
Example #4
0
 public static void Error(string moduleName, string msg, Exception ex = null)
 {
     NLogProxy.Write(moduleName, LogLevel.Error, msg, ex);
 }
Example #5
0
 public static void Debug(string moduleName, string msg, Exception ex = null)
 {
     NLogProxy.Write(moduleName, LogLevel.Debug, msg, ex);
 }
Example #6
0
 public static void Trace(string moduleName, string msg, Exception ex = null)
 {
     NLogProxy.Write(moduleName, LogLevel.Trace, msg, ex);
 }
Example #7
0
 public static void Write(LogLevel level, string msg, Exception ex = null)
 {
     NLogProxy.Write(DefaultModuleName, level, msg, ex);
 }
Example #8
0
 public static string GetString(string msg, Exception ex = null)
 {
     return($"{msg} {NLogProxy.GetException(ex)}");
 }