Esempio n. 1
0
 private static LoggerConfiguration WithCommonProperties(this LoggerEnrichmentConfiguration config)
 {
     return(config.FromLogContext()
            .Enrich.WithMachineName()
            .Enrich.WithProcessName()
            .Enrich.WithProcessId()
            .Enrich.WithThreadId());
 }
 public static LoggerConfiguration FromLogProxy(this LoggerEnrichmentConfiguration enrichmentConfiguration)
 {
     if (enrichmentConfiguration == null)
     {
         throw new ArgumentNullException(nameof(enrichmentConfiguration));
     }
     return(enrichmentConfiguration.FromLogContext()
            .Enrich.FromTrackingContext());
 }
Esempio n. 3
0
 // Unlike the other configuration methods, FromLogContext is an instance method rather than an extension.
 internal static LoggerConfiguration FromLogContext(LoggerEnrichmentConfiguration loggerEnrichmentConfiguration)
 => loggerEnrichmentConfiguration.FromLogContext();
 internal static LoggerConfiguration FromLogContext(LoggerEnrichmentConfiguration loggerEnrichmentConfiguration)
 {
     return(loggerEnrichmentConfiguration.FromLogContext());
 }