Beispiel #1
0
            public void Log(dotless.Core.Loggers.LogLevel level, string message, params object[] args)
            {
                if (string.IsNullOrWhiteSpace(message))
                {
                    return;
                }

                switch (level)
                {
                case dotless.Core.Loggers.LogLevel.Debug:
                    Debug(message);
                    return;

                case dotless.Core.Loggers.LogLevel.Error:
                    Error(message);
                    return;

                case dotless.Core.Loggers.LogLevel.Info:
                    Info(message);
                    return;

                case dotless.Core.Loggers.LogLevel.Warn:
                    Warn(message);
                    return;

                default:
                    _logger.Log(CSSMinifier.Logging.LogLevel.Warning, DateTime.Now, () => "DotLess logged message with unsupported LogLeve [" + level.ToString() + "]: " + message, null);
                    return;
                }
            }
Beispiel #2
0
        public void Log(LogLevel level, string message)
        {
            Infrastructure.Server.LogLevel bundleLogLevel;

            switch (level)
            {
            case LogLevel.Info:
                bundleLogLevel = Infrastructure.Server.LogLevel.Info;
                break;

            case LogLevel.Debug:
                bundleLogLevel = Infrastructure.Server.LogLevel.Debug;
                break;

            case LogLevel.Warn:
                bundleLogLevel = Infrastructure.Server.LogLevel.Warn;
                break;

            case LogLevel.Error:
                bundleLogLevel = Infrastructure.Server.LogLevel.Error;
                break;

            default:
                bundleLogLevel = Infrastructure.Server.LogLevel.Info;
                break;
            }

            _bundleDiagnostic.Log(bundleLogLevel, nameof(LessBundleContentTransformer), nameof(IBundleContentTransformer.Process), message);
        }
Beispiel #3
0
            public void Log(dotless.Core.Loggers.LogLevel level, string message)
            {
                WriteLine(message);
                switch (level)
                {
                case LogLevel.Debug:
                    _traceAction(TraceLevel.Debug, () => message);
                    break;

                case LogLevel.Error:
                case LogLevel.Warn:
                    _traceAction(TraceLevel.Error, () => message);
                    break;

                case LogLevel.Info:
                    _traceAction(TraceLevel.Information, () => message);
                    break;
                }
            }
Beispiel #4
0
 public void Log(dotless.Core.Loggers.LogLevel level, string message)
 {
     Log(level, message, new object[0]);
 }