1

I'm using Serilog to log events across my application. This application is composed of different modules (it's an MVC application) that we can consider Area of the application. I was wondering if it's possible to add a context information local to each module. So that in my log I'll have something in the form

[ModuleA] - Information - Event1

I forgot to tell you that each module has it's own registration feature

 protected override void RegisterModule(IModuleContainer container, IIndexedAppSettings settings)
    {
       [registrations]
    }

I can have a ILogger reference in each Module but I don't know how to tell in each controller to use that specific Log instance

advapi
  • 3,661
  • 4
  • 38
  • 73

0 Answers0