File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change 44using Microsoft . Extensions . DependencyInjection ;
55using Microsoft . Extensions . Logging ;
66using Microsoft . Extensions . Options ;
7- using Splunk ;
87using Splunk . Configurations ;
98
109namespace Splunk . SampleWebAPI
@@ -36,13 +35,15 @@ public void ConfigureServices(IServiceCollection services)
3635 /// <param name="loggerFactory">Logger factory.</param>
3736 public void Configure ( IApplicationBuilder app , IHostingEnvironment env , ILoggerFactory loggerFactory )
3837 {
39- //loggerFactory.AddDebug();
40-
41- var splunkLoggerConfigurationOption = app . ApplicationServices . GetService < IOptions < SplunkLoggerConfiguration > > ( ) ;
42-
38+
4339 /******************************** Define Your Logger *********************************/
4440 /* */
45- loggerFactory . AddHECRawSplunkLogger ( splunkLoggerConfigurationOption . Value ) ; //
41+ // Get Configuration to be used at Logger //
42+ var splunkLoggerConfiguration = GetSplunkLoggerConfiguration ( app ) ;
43+ // //
44+ // Choose one or more of those loggers //
45+ // //
46+ loggerFactory . AddHECRawSplunkLogger ( splunkLoggerConfiguration ) ; //
4647 // //
4748 // //
4849 //loggerFactory.AddHECJsonSplunkLogger(splunkConfiguration); //
You can’t perform that action at this time.
0 commit comments