Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise integrated logging solutions #1047

Closed
GuusLieben opened this issue Jan 8, 2024 · 0 comments · Fixed by #1069
Closed

Revise integrated logging solutions #1047

GuusLieben opened this issue Jan 8, 2024 · 0 comments · Fixed by #1069
Labels
Refinement Needs refinement
Milestone

Comments

@GuusLieben
Copy link
Member

Description

Provide a revised solution to providing loggers to components, without the need for a ApplicationLogger.

Current behavior

The current integrated logging solution, specifically the ApplicationLogger (which is partially implemented by the CallerLookupApplicationLogger, which in turn is extended by Slf4jApplicationLogger and LogbackApplicationLogger offers easy access to loggers anywhere you can access a ApplicationLogger. As ApplicationContext extends this interface, it is thus possible to use loggers anywhere you have a ApplicationContext. While this is great for internal development, where we often have direct access to a ApplicationContext, it is not optimal for third parties using the framework.

Use case

Making it easier to access loggers can motivate third parties to apply proper logging techniques in their applications. Additionally, it would be possible for us to better align the provision of logging to the rest of the framework.

Expected behavior

While a simple solution would be to offer only a configuration for logging (currently for Logback), which would allow users to obtain a logger through a LoggerFactory, that solution does not align with the framework's common approaches (though it should be noted that this approach is valid, and should remain supported).

A preferable way would be to provide default bindings for a application global logger, without the ApplicationLogger abstraction.

Additional context

No response

Related issues

No response

Possible implementations

No response

@GuusLieben GuusLieben added this to the Release 0.6.0 milestone Jan 8, 2024
GuusLieben added a commit that referenced this issue Mar 18, 2024
GuusLieben added a commit that referenced this issue Mar 18, 2024
GuusLieben added a commit that referenced this issue Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refinement Needs refinement
Development

Successfully merging a pull request may close this issue.

1 participant