Exemplo n.º 1
0
 public static ILoggingBuilder AddSyslog(this ILoggingBuilder loggingBuilder, SysLogSettings settings)
 {
     loggingBuilder?.AddProvider(
         SyslogLoggerProviderExtensions.CreateSyslogLoggerProvider(settings)
         );
     return(loggingBuilder);
 }
Exemplo n.º 2
0
        private static SyslogLoggerProvider CreateSyslogLoggerProvider(string host, int port, Func <string, LogLevel, bool> filter = null)
        {
            SyslogLoggerProvider provider = SyslogLoggerProviderExtensions.CreateSyslogLoggerProvider(
                IPAddress.Parse(host ?? "127.0.0.1"),
                port,
                filter);

            return(provider);
        }
Exemplo n.º 3
0
 public static ILoggingBuilder AddSyslog(this ILoggingBuilder loggingBuilder, IPAddress host, int port, Func <string, LogLevel, bool> filter = null)
 {
     loggingBuilder?.AddProvider(
         SyslogLoggerProviderExtensions.CreateSyslogLoggerProvider(host, port, filter));
     return(loggingBuilder);
 }
Exemplo n.º 4
0
 public static ILoggerFactory AddSyslog(this ILoggerFactory factory, IPAddress host, int port, Func <string, LogLevel, bool> filter = null)
 {
     factory?.AddProvider(
         SyslogLoggerProviderExtensions.CreateSyslogLoggerProvider(host, port, filter));
     return(factory);
 }