-
Notifications
You must be signed in to change notification settings - Fork 130
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
Add a default logger in bin/jobs #423
Comments
Hmm I just noticed if I define the logger like that, the related AR query logs still only end up in If I run it in puma plugin mode I do get them all together, but I guess that makes sense as they will share the same logger then. |
Hey @djfpaagman! By default, Solid Queue uses Rails's logger, which in development writes to ActiveSupport::Logger.new($stdout) the queries logged by Active Record would still go to the logger configured in |
hi @rosa! Indeed that's how it's happening right now, it's just not the expected behavior for me. I run my app through foreman with a Procfile like so:
By default, the logs from Solid Queue are not visible anywhere and only go to development.log. If I run Solid Queue via the Puma plugin I do get all the logs in my web process (as they then share the rails logger?). If I configure the logger explicitly I only get the logs from Solid Queue itself (the ones defined in https://github.com/rails/solid_queue/blob/main/lib/solid_queue/log_subscriber.rb), but not the AR logs. I would expect all the logs from a particular process to be sent to the output of that process when configured to log there. And I think it would make sense to do that by default, at least in development environments. |
Hello,
I'm wondering if it's a good idea to add a default logger in the generated
bin/jobs
file. I use it in development and was expecting at least some log output from it, but it's entirely silent.What works for me locally is adding:
do you feel like adding this makes sense? I'll happily create a PR if so :)
I'm not sure if it's ok to rely on Active Support like this directly, so suggestions are also welcome.
The text was updated successfully, but these errors were encountered: