Exemplo n.º 1
0
        public static LoggerConfiguration ApplicationInsightsExtension(this LoggerSinkConfiguration sinkConfiguration, string roleName, string roleInstance, LogEventLevel restrictedToMinimumLevel)
        {
            _roleName     = roleName;
            _roleInstance = roleInstance;

            return(sinkConfiguration.ApplicationInsights(TelemetryConfiguration.Active, ConvertLogEventsToCustomTraceTelemetry, restrictedToMinimumLevel));
        }
Exemplo n.º 2
0
 public static LoggerConfiguration ApplicationInsightsWithStandardLoggersForTraceTelemetry(this LoggerSinkConfiguration sinkConfiguration, string appInsightsInstrumentationkey)
 {
     return(sinkConfiguration.ApplicationInsights(appInsightsInstrumentationkey, (Func <LogEvent, IFormatProvider, ITelemetry>)LogEventConverters.ConvertLogEventsToTraceTelemetryWithContext));
 }