Ejemplo n.º 1
0
        internal CustomerConsoleLogger(string name, Func <string, LogLevel, bool> filter, bool includeScopes, ConsoleLoggerProcessor loggerProcessor)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }

            Name          = name;
            Filter        = filter ?? ((category, logLevel) => true);
            IncludeScopes = includeScopes;

            _queueProcessor = loggerProcessor;

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                Console = new WindowsLogConsole();
            }
            else
            {
                Console = new AnsiLogConsole(new AnsiSystemConsole());
            }
        }
Ejemplo n.º 2
0
 public CustomConsoleLogProvider(ConsoleLoggerProcessor processor)
 {
     _Processor = processor;
 }