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

Silence Ruby 2.7 warnings #4412

Merged
merged 1 commit into from Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sidekiq/logger.rb
Expand Up @@ -104,7 +104,7 @@ def add(severity, message = nil, progname = nil, &block)
class Logger < ::Logger
include LoggingUtils

def initialize(*args)
def initialize(*args, **kwargs)
super
self.formatter = Sidekiq.log_formatter
end
Expand Down
8 changes: 8 additions & 0 deletions test/test_logger.rb
Expand Up @@ -108,6 +108,14 @@ def test_json_output_is_parsable
assert_equal "INFO", hash["lvl"]
end

def test_forwards_logger_kwargs
assert_silent do
logger = Sidekiq::Logger.new('/dev/null', level: Logger::INFO)

assert_equal Logger::INFO, logger.level
end
end

def reset(io)
io.truncate(0)
io.rewind
Expand Down