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

Custom logger for Redis pool #28

Open
kacperk opened this issue Aug 5, 2021 · 1 comment
Open

Custom logger for Redis pool #28

kacperk opened this issue Aug 5, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@kacperk
Copy link

kacperk commented Aug 5, 2021

Is your feature request related to a problem? Please describe.
Currently, if I set LOG_LEVEL to debug for running vapor apps, all redis commands to check the job queue produce 2 log entries and if you consider that it is doing once each second per worker it produces a lot of logs. As a result, it is very hard to find anything usable in the log without grep.

Describe the solution you'd like
It should be possible to set log level/custom logger for redis pool - something like:

app.queues.use(try .redis(url: redisUrl, logger: myCustomLogger))
@kacperk kacperk added the enhancement New feature or request label Aug 5, 2021
@0xTim
Copy link
Member

0xTim commented Aug 18, 2021

In general I'm against this. The whole design �of swift-log and the ecosystem is a shared central logger and allowing this to be broken is likely to cause confusion. IMO the focus should be on cleaning up the logs so we don't have duplicates and enhancing the metadata provided to the logger to allow logging tools to better filter logs.

Happy to open it up for discussion however

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants