示例#1
0
        public static ILoggerFactory AddMXLogger(this ILoggerFactory factory, Action <string> writeLine, LogLevel logLevel = LogLevel.Trace)
        {
            var provider = new MXLoggerProvider(writeLine, logLevel);

            factory.AddProvider(provider);
            return(factory);
        }
示例#2
0
        public static ILoggingBuilder AddMXLogger(this ILoggingBuilder builder, Action <string> writeLine, LogLevel logLevel = LogLevel.Trace)
        {
            var provider = new MXLoggerProvider(writeLine, logLevel);

            return(builder.AddProvider(provider));
        }
示例#3
0
 internal MXLogger(MXLoggerProvider provider, string category) =>
 (Provider, Category) = (provider, category);