public static ILoggingBuilder AddSyslog(this ILoggingBuilder loggingBuilder, SysLogSettings settings) { loggingBuilder?.AddProvider( SyslogLoggerProviderExtensions.CreateSyslogLoggerProvider(settings) ); return(loggingBuilder); }
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); }
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); }
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); }