Skip to content

Commit 1e785e6

Browse files
committed
Removed VTEX reference and improved documentation under SplunkLogger setup
#46
1 parent 93a245b commit 1e785e6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/SampleWebAPI/Startup.cs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
using Microsoft.Extensions.DependencyInjection;
55
using Microsoft.Extensions.Logging;
66
using Microsoft.Extensions.Options;
7-
using Splunk;
87
using Splunk.Configurations;
98

109
namespace 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); //

0 commit comments

Comments
 (0)