Thanks a lot, I'm happy you did find this helpful.
Nice spot, there was a mistake into the csproj and the Serilog config was not loaded in the 'Development' configuration. I've updated the repo with this change.
You can access the logger in MyService class injecting the ILogger class through the constructor:
publicclassMyService:IMyService{privatereadonlyILogger<MyService>_logger;publicMyService(ILogger<MyService>logger){_logger=logger;}publicasyncTaskPerformLongTaskAsync(){_logger?.LogInformation("Whatever you want");awaitTask.Delay(5000);}}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks a lot, I'm happy you did find this helpful.
Nice spot, there was a mistake into the csproj and the Serilog config was not loaded in the 'Development' configuration. I've updated the repo with this change.
You can access the logger in MyService class injecting the ILogger class through the constructor: