1

My use-case is multiple unrelated DLLs running as plugins in AutoCAD. Each one has the static global Serilog Logger as described at https://github.com/serilog/serilog/wiki/Lifecycle-of-Loggers#in-all-apps. They are all configured to write to Rolling Files.

I have now realised this has created an odd race-condition where the actual logger could be any one, and only one, of the Loggers declared in each plugin DLL (probably depending on which one declared it last).

How do I have a separate Rolling File Logger for each plugin?

Is the best practise for this use-case to use a separate internal static ILogger for each plugin and write to that static logger?

CAD bloke
  • 8,578
  • 7
  • 65
  • 114

1 Answers1

1

The logger-per-plugin approach sounds like the way to go, yes.

Nicholas Blumhardt
  • 30,271
  • 4
  • 90
  • 101