Skip to content

Conversation

@StuartFerguson
Copy link
Member

This commit introduces a new Shared.Logger namespace, implementing a comprehensive logging framework with classes such as ILogger, NlogLogger, MicrosoftLogger, and NullLogger. The TenantContext has been restructured and moved to Shared.Logger.TennantContext.

Key updates include:

  • Replaced references to Shared.TennantContext with Shared.Logger.TennantContext.
  • Enhanced logging setup in EventStoreContextTests.cs using LogManager.Setup.
  • Added a project reference for Shared.Logger in the solution file.
  • Defined the ILogger interface for various logging levels.
  • Updated the Logger class to utilize the new interface and initialize different logger types.
  • Modified CorrelationIdMiddleware.cs to log correlation IDs appropriately.

These changes improve code organization and enhance the application's logging capabilities.

closes #343

StuartFerguson and others added 4 commits July 10, 2025 12:06
This commit introduces a new `Shared.Logger` namespace, implementing a comprehensive logging framework with classes such as `ILogger`, `NlogLogger`, `MicrosoftLogger`, and `NullLogger`. The `TenantContext` has been restructured and moved to `Shared.Logger.TennantContext`.

Key updates include:
- Replaced references to `Shared.TennantContext` with `Shared.Logger.TennantContext`.
- Enhanced logging setup in `EventStoreContextTests.cs` using `LogManager.Setup`.
- Added a project reference for `Shared.Logger` in the solution file.
- Defined the `ILogger` interface for various logging levels.
- Updated the `Logger` class to utilize the new interface and initialize different logger types.
- Modified `CorrelationIdMiddleware.cs` to log correlation IDs appropriately.

These changes improve code organization and enhance the application's logging capabilities.
This commit deletes the `WriteExceptionToLog` and `WriteMessageToLog` static methods from the `TenantContext` class. These methods were used for logging exceptions and messages with tenant-specific support. The associated logging context setup has also been removed.
…erguson/Shared into task/#343_split_out_logger
@StuartFerguson StuartFerguson merged commit 2847dd5 into master Jul 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split Logger into separate nuget package

2 participants