mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
DEV: Ensure Sidekiq warnings are logged to STDERR (#15800)
The default configuration will log to STOUT, which pollutes the output of scripts/rake-tasks
This commit is contained in:
parent
f5824dd586
commit
dfcb8a72fd
|
@ -81,7 +81,7 @@ if Sidekiq.server?
|
|||
end
|
||||
end
|
||||
|
||||
Sidekiq.logger.level = Logger::WARN
|
||||
Sidekiq.logger = Sidekiq::Logger.new(STDERR, level: Logger::WARN)
|
||||
|
||||
class SidekiqLogsterReporter < Sidekiq::ExceptionHandler::Logger
|
||||
def call(ex, context = {})
|
||||
|
|
|
@ -31,7 +31,7 @@ class Demon::Sidekiq < ::Demon::Base
|
|||
# trouble, if STDOUT is closed in our process all sort of weird
|
||||
# will ensue, resetting the logger ensures it will reinit correctly
|
||||
# parent process is in charge of the file anyway.
|
||||
Sidekiq.logger = nil
|
||||
Sidekiq.logger = Sidekiq::Logger.new(STDERR, level: Logger::WARN)
|
||||
cli = Sidekiq::CLI.instance
|
||||
|
||||
# Unicorn uses USR1 to indicate that log files have been rotated
|
||||
|
|
Loading…
Reference in New Issue
Block a user