-
Notifications
You must be signed in to change notification settings - Fork 134
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
Generalize silence_polling
to silence_queries
#210
Comments
@rosa do you know of a global way we can wrap all the querying methods in solid_queue in a similar fashion to how the polling is wrapped currently? Or is it more likely that we'll just need to pick off the methods one-by-one and make sure new functionality gets wrapped similarly? Happy to take a stab at this one once that approach gets nailed down. Thanks! |
Up to this issue, as it really quite distracting in dev mode. With dozens of jobs / recurring jobs and settings
It's literally an infinite flood in the terminal with SolidQueue related SQL logs. I am also a bit confused trying setting different "logger" for SolidQueue, trying to redirect it's logs and using other log_level. But it is not redirecting all logs, only from here https://github.com/rails/solid_queue/blob/main/lib/solid_queue/log_subscriber.rb Also there is ActiveJob with it's own logger in the equation. And while trying to set custom logger to One workaround for this is
require_relative "../config/environment"
require "solid_queue/cli"
# Keep using single Rails.logger for everything, but for this instance of Ruby env set log level INFO in dev
Rails.logger.level = Logger::INFO if Rails.env.local?
SolidQueue::Cli.start(ARGV) It keeps logger setting in one place (basic Rails logger config), log level for web app itself in dev can be still kept |
Originally posted by @rosa in #198 (comment)
As mentioned in #198,
silence_polling
only silences the polling queries (which makes sense), and continues to log for all other querying methods. I think many, especially in a development environment, would be interested in asilence_queries
setting to fully silence heart_beat, semaphore, etc queries and keep their logs clean. We likely should maintainsilence_polling
, at least for now, for backwards compatibility.The text was updated successfully, but these errors were encountered: