mirror of
https://github.com/samsonjs/grape_logging.git
synced 2026-04-27 14:57:40 +00:00
AutoFix RuboCop Style/IfUnlessModifier
This commit is contained in:
parent
65aa4648b2
commit
4ca251f9a8
2 changed files with 1 additions and 9 deletions
|
|
@ -157,12 +157,6 @@ Style/HashSyntax:
|
||||||
Exclude:
|
Exclude:
|
||||||
- 'lib/grape_logging/formatters/logstash.rb'
|
- 'lib/grape_logging/formatters/logstash.rb'
|
||||||
|
|
||||||
# Offense count: 1
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
Style/IfUnlessModifier:
|
|
||||||
Exclude:
|
|
||||||
- 'lib/grape_logging/reporters/logger_reporter.rb'
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
# This cop supports unsafe autocorrection (--autocorrect-all).
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
||||||
# Configuration parameters: EnforcedStyle, Autocorrect.
|
# Configuration parameters: EnforcedStyle, Autocorrect.
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ module Reporters
|
||||||
def initialize(logger, formatter, log_level)
|
def initialize(logger, formatter, log_level)
|
||||||
@logger = logger.clone || Logger.new(STDOUT)
|
@logger = logger.clone || Logger.new(STDOUT)
|
||||||
@log_level = log_level || :info
|
@log_level = log_level || :info
|
||||||
if @logger.respond_to?(:formatter=)
|
@logger.formatter = formatter || @logger.formatter || GrapeLogging::Formatters::Default.new if @logger.respond_to?(:formatter=)
|
||||||
@logger.formatter = formatter || @logger.formatter || GrapeLogging::Formatters::Default.new
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def perform(params)
|
def perform(params)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue