private void Logger(string message, CommonLogLevel logLevel) { switch (logLevel) { case CommonLogLevel.Debug: Log.Debug(message); break; case CommonLogLevel.Error: Log.Error(message); break; case CommonLogLevel.Information: Log.Info(message); break; default: Log.Info(message); break; } }
/// <summary> /// /// </summary> /// <param name="logLevel"></param> /// <param name="format"></param> /// <param name="cause"></param> /// <param name="args"></param> protected void Log(CommonLogLevel logLevel, string format, Exception cause, params object[] args) { switch (logLevel) { case CommonLogLevel.Debug: Logger.Debug(format, args); break; case CommonLogLevel.Error: Logger.Error(cause, format, args); break; case CommonLogLevel.Info: Logger.Info(format, args); break; case CommonLogLevel.Warn: Logger.Warning(format, args); break; } }