/// <summary> /// Use colored console stdout for logging (probably only useful for debugging and test scenarios) /// </summary> public static void ColoredConsole(this LoggingConfigurer configurer, LogLevel minLevel) { configurer.Use(new ConsoleLoggerFactory(colored: true) { MinLevel = minLevel }); }
/// <summary> /// Use colored console stdout for logging (probably only useful for debugging and test scenarios) /// and allow the colors to be customized /// </summary> public static void ColoredConsole(this LoggingConfigurer configurer, LoggingColors colors) { configurer.Use(new ConsoleLoggerFactory(colored: true) { Colors = colors }); }
/// <summary> /// Configures Rebus to use Serilog for all of its internal logging. Will automatically add a correlation ID variable as a Serilog /// context property under the key specified by <paramref name="overriddenCorrelationIdPropertyKey"/> when handling messages, /// allowing log output to include that. /// </summary> public static void Serilog(this LoggingConfigurer configurer, string overriddenCorrelationIdPropertyKey) { configurer.Use(new SerilogLoggerFactory()); SetUpEventHandler(configurer, overriddenCorrelationIdPropertyKey); }
/// <summary> /// Configures Rebus to use Serilog for all of its internal logging. Will automatically add a 'CorrelationId' variable as a Serilog /// context property when handling messages, allowing log output to include that. /// </summary> public static void Serilog(this LoggingConfigurer configurer) { configurer.Use(new SerilogLoggerFactory()); SetUpEventHandler(configurer, DefaultCorrelationIdPropertyKey); }
public static void NLog(this LoggingConfigurer configurer) { configurer.Use(new NLogLoggerFactory()); }
/// <summary> /// Configures Rebus to use Log4net for all of its internal logging /// </summary> public static void Log4Net(this LoggingConfigurer configurer) { configurer.Use(new Log4NetLoggerFactory()); }
/// <summary> /// Disables logging completely. Why would you do that? /// </summary> public static void None(this LoggingConfigurer configurer) { configurer.Use(new NullLoggerFactory()); }
/// <summary> /// Use the .NET's <see cref="System.Diagnostics.Trace"/> for logging. /// </summary> public static void Trace(this LoggingConfigurer configurer) { configurer.Use(new TraceLoggerFactory()); }
/// <summary> /// Use console stdout for logging (probably only useful for debugging and test scenarios) /// </summary> public static void Console(this LoggingConfigurer configurer) { configurer.Use(new ConsoleLoggerFactory(colored: false)); }
/// <summary> /// Configures Rebus to use Log4net for all of its internal logging /// </summary> public static void Log4Net(this LoggingConfigurer configurer, string correlationIdPropertyKey) { configurer.Use(new Log4NetLoggerFactory()); SetUpEventHandler(configurer, correlationIdPropertyKey); }
/// <summary> /// Configures Rebus to use Log4net for all of its internal logging /// </summary> public static void Log4Net(this LoggingConfigurer configurer) { configurer.Use(new Log4NetLoggerFactory()); SetUpEventHandler(configurer); }
/// <summary> /// Configures Rebus to use Serilog for all of its internal logging, using the given <see cref="configuration"/> to create /// all of its loggers. Will add as logger properties the headers specified as keys in the given <see cref="headerKeyToLoggerPropertyMappings"/> /// dictionary, using as logger property name the value for each given key. /// </summary> public static void Serilog(this LoggingConfigurer configurer, LoggerConfiguration configuration, IDictionary <string, string> headerKeyToLoggerPropertyMappings) { configurer.Use(new SerilogLoggerFactory(configuration)); SetUpEventHandler(configurer, headerKeyToLoggerPropertyMappings); }
/// <summary> /// Configures Rebus to use Serilog for all of its internal logging, using the given <see cref="configuration"/> to create /// all of its loggers. Automatically adds the <see cref="CorrelationIdLoggerProperty"/> /// logger property to the logging context when handling a message that has a <see cref="Headers.CorrelationId"/> header. /// </summary> public static void Serilog(this LoggingConfigurer configurer, LoggerConfiguration configuration) { configurer.Use(new SerilogLoggerFactory(configuration)); SetUpEventHandler(configurer, DefaultHeaderKeyToLoggerPropertyMappings); }