Example #1
0
        public static NLog.LogLevel LogLevelConvert(LogLevel logEvent)
        {
            switch (logEvent)
            {
            case LogLevel.Fatal:
                return(NLog.LogLevel.Fatal);

            case LogLevel.Error:
                return(NLog.LogLevel.Error);

            case LogLevel.Warn:
                return(NLog.LogLevel.Warn);

            case LogLevel.Info:
                return(NLog.LogLevel.Info);

            case LogLevel.Debug:
                return(NLog.LogLevel.Debug);

            case LogLevel.Trace:
                return(NLog.LogLevel.Trace);

            default:
                return(NLog.LogLevel.Info);
            }
        }
Example #2
0
        public GrapevineLogger(NLog.LogLevel logLevel)
        {
            switch (logLevel.Ordinal)
            {
            case 0:
                Level = LogLevel.Trace;
                break;

            case 1:
                Level = LogLevel.Debug;

                break;

            case 2:
                Level = LogLevel.Info;

                break;

            case 3:
                Level = LogLevel.Warn;

                break;

            case 4:
                Level = LogLevel.Error;

                break;

            case 5:
                Level = LogLevel.Fatal;
                break;

            default:
                Level = LogLevel.Info;
                break;
            }
        }
Example #3
0
 public GrapevineLogger(LogLevel level)
 {
     Level = level;
 }