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

No-op logger is not a sane default #387

Open
sesm opened this issue Jan 21, 2024 · 0 comments
Open

No-op logger is not a sane default #387

sesm opened this issue Jan 21, 2024 · 0 comments

Comments

@sesm
Copy link

sesm commented Jan 21, 2024

If no SLF4J providers are found, SLF4J defaults to no-op logger, which results in all logs, including errors and exceptions being hidden.

IMO this is not a sane default, a better default would be logging exceptions, errors and warning to stdout. stdout is perfectly fine for development and became a common practice for Docker containers in production.

The codebase already has SimpleLogger that does this, but when I tried to reference it in slf4j.LoggerFactory it introduced a circular dependency. Maybe it makes sense to copy SimpleLogger to base package, remove all extra code for configurability/etc, call it FallbackStdoutLogger and use it by default?

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

No branches or pull requests

1 participant