public ILevelLogFormatter Instanciate(ElogLevel logLevel)
        {
            switch (logLevel)
            {
            case ElogLevel.Trace: return(new TraceLogFormatter());

            case ElogLevel.Info: return(new InfoLogFormatter());

            case ElogLevel.Debug: return(new DebugLogFormatter());

            case ElogLevel.Warning: return(new WarningFormatter());

            case ElogLevel.Error: return(new ErrorLogFormatter());

            case ElogLevel.Critical: return(new CriticalLogFormatter());

            default: throw new ArgumentException("ElogLEvel value is not valid", "logLevel");
            }
        }
Beispiel #2
0
 public static extern void pg_elog(ElogLevel elevel, string message);
 private static ILevelLogFormatter InstanciateLevelLoger(ElogLevel logLevel)
 => LevelLogFormatterFactory.Instance.Instanciate(logLevel);