public static ILogHelperLoggingBuilder WithEnricher <TEnricher>(this ILogHelperLoggingBuilder loggingBuilder) where TEnricher : ILogHelperLoggingEnricher, new() { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddEnricher(new TEnricher()); return(loggingBuilder); }
public static ILogHelperLoggingBuilder EnrichWithProperty(this ILogHelperLoggingBuilder loggingBuilder, string propertyName, Func <LogHelperLoggingEvent, object> valueFactory, Func <LogHelperLoggingEvent, bool> predict, bool overwrite = false) { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddEnricher(new PropertyLoggingEnricher(propertyName, valueFactory, predict, overwrite)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithProvider <TLogProvider>(this ILogHelperLoggingBuilder loggingBuilder, params object[] ctorParams) where TLogProvider : ILogHelperProvider { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddProvider(ActivatorHelper.CreateInstance <TLogProvider>(ctorParams)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithProvider <TLogProvider>(this ILogHelperLoggingBuilder loggingBuilder) where TLogProvider : ILogHelperProvider, new() { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddProvider(new TLogProvider()); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithProvider(this ILogHelperLoggingBuilder loggingBuilder, ILogHelperProvider logHelperProvider) { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddProvider(logHelperProvider); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithFilter(this ILogHelperLoggingBuilder loggingBuilder, Func <Type, LogHelperLoggingEvent, bool> filterFunc) { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddFilter(filterFunc); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithFilter(this ILogHelperLoggingBuilder loggingBuilder, Func <Type, string, LogHelperLogLevel, Exception?, bool> filterFunc) { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); loggingBuilder.AddFilter((type, e) => filterFunc.Invoke(type, e.CategoryName, e.LogLevel, e.Exception)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithEnricher <TEnricher>(this ILogHelperLoggingBuilder loggingBuilder, params object[] ctorParams) where TEnricher : ILogHelperLoggingEnricher { loggingBuilder.AddEnricher(ActivatorHelper.CreateInstance <TEnricher>(ctorParams)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithEnricher <TEnricher>(this ILogHelperLoggingBuilder loggingBuilder) where TEnricher : ILogHelperLoggingEnricher, new() { loggingBuilder.AddEnricher(new TEnricher()); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithProvider <TLogProvider>(this ILogHelperLoggingBuilder loggingBuilder) where TLogProvider : ILogHelperProvider, new() { loggingBuilder.AddProvider(new TLogProvider()); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithProvider(this ILogHelperLoggingBuilder loggingBuilder, ILogHelperProvider logHelperProvider) { loggingBuilder.AddProvider(logHelperProvider); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithFilter(this ILogHelperLoggingBuilder loggingBuilder, Func <Type, LogHelperLoggingEvent, bool> filterFunc) { loggingBuilder.AddFilter(filterFunc); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithMinimumLevel(this ILogHelperLoggingBuilder loggingBuilder, LogHelperLogLevel logLevel) { Guard.NotNull(loggingBuilder, nameof(loggingBuilder)); return(loggingBuilder.WithFilter(level => level >= logLevel)); }
public static ILogHelperLoggingBuilder AddLog4Net(this ILogHelperLoggingBuilder loggingBuilder, string configFilePath) { loggingBuilder.AddProvider(new Log4NetLogHelperProvider(configFilePath)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder AddSerilog([NotNull] this ILogHelperLoggingBuilder loggingBuilder, LoggerConfiguration loggerConfiguration) { loggingBuilder.AddProvider(new SerilogLogHelperProvider(loggerConfiguration)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder EnrichWithProperty(this ILogHelperLoggingBuilder loggingBuilder, string propertyName, Func <LogHelperLoggingEvent> valueFactory, bool overwrite = false) { loggingBuilder.AddEnricher(new PropertyLoggingEnricher(propertyName, valueFactory, overwrite)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithFilter(this ILogHelperLoggingBuilder loggingBuilder, Func <LogHelperLogLevel, bool> filterFunc) { loggingBuilder.AddFilter((_, e) => filterFunc.Invoke(e.LogLevel)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder EnrichWithProperty(this ILogHelperLoggingBuilder loggingBuilder, string propertyName, object value, Func <LogHelperLoggingEvent, bool> predict, bool overwrite = false) { loggingBuilder.AddEnricher(new PropertyLoggingEnricher(propertyName, e => value, predict, overwrite)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder WithMinimumLevel(this ILogHelperLoggingBuilder loggingBuilder, LogHelperLogLevel logLevel) { return(loggingBuilder.WithFilter(level => level >= logLevel)); }
internal static void AddMicrosoftLogging(this ILogHelperLoggingBuilder logHelperFactory, ILoggerFactory loggerFactory) { logHelperFactory.AddProvider(new MicrosoftLoggingLogHelperProvider(loggerFactory)); }
public static ILogHelperLoggingBuilder WithFilter(this ILogHelperLoggingBuilder loggingBuilder, Func <Type, string, LogHelperLogLevel, bool> filterFunc) { loggingBuilder.AddFilter((type, e) => filterFunc.Invoke(type, e.CategoryName, e.LogLevel)); return(loggingBuilder); }
public static ILogHelperLoggingBuilder AddLog4Net(this ILogHelperLoggingBuilder loggingBuilder) { loggingBuilder.AddProvider(new Log4NetLogHelperProvider()); return(loggingBuilder); }
public static ILogHelperLoggingBuilder AddSerilog(this ILogHelperLoggingBuilder loggingBuilder, Action <LoggerConfiguration> loggerConfigurationAction) { loggingBuilder.AddProvider(new SerilogLogHelperProvider(loggerConfigurationAction)); return(loggingBuilder); }