SumoLogic / sumologic-net-appenders

Several appenders for .NET developers to use that send logs straight to SumoLogic.
Apache License 2.0
23 stars 39 forks source link

sumologic.logging.aspnetcore readme provides very little guidance #80

Closed Voochichichi closed 5 years ago

Voochichichi commented 5 years ago

Hey guys,

I would love to use the new aspnetcore ILogger appender! I found this : https://github.com/SumoLogic/sumologic-net-appenders/blob/master/docs/sumologic.logging.aspnetcore.md

However it gives me very little direction in how to use it... and it's left me a little confused... Is there chance you can provide guidance/example on:

  1. Using appsettings.json ? Maybe with like Uri, SourceName, ConversionPattern? The example shows almost nothing SumoLogic about configuration https://github.com/SumoLogic/sumologic-net-appenders/blob/master/SumoLogic.Logging.AspNetCore.Example/appsettings.json

  2. What's the best place to call AddSumoLogic ? in StartUp? or Main? your example seems to do both? https://github.com/SumoLogic/sumologic-net-appenders/blob/master/SumoLogic.Logging.AspNetCore.Example/Startup.cs https://github.com/SumoLogic/sumologic-net-appenders/blob/master/SumoLogic.Logging.AspNetCore.Example/Program.cs

Thanks so much for the help!

bin3377 commented 5 years ago

Thanks for your feedback. 1) for the details about configuration through appsettings.json, you can probably adding .AddJsonFile() as this article.

2) you can pick either. the example code switching between them with un/set USE_BUILDER macro