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

Ruby 2.4 warns to forward private methods #1579

Merged
merged 1 commit into from
May 19, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 19 additions & 19 deletions lib/fluent/log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,25 +248,6 @@ def flush
@out.flush
end

private

def dump_stacktrace(backtrace, level)
return if @level > level

time = Time.now
line = caller_line(time, 5, level)
if @suppress_repeated_stacktrace && (Thread.current[:last_repeated_stacktrace] == backtrace)
puts [" ", line, 'suppressed same stacktrace'].join
else
backtrace.each { |msg|
puts [" ", line, msg].join
}
Thread.current[:last_repeated_stacktrace] = backtrace if @suppress_repeated_stacktrace
end

nil
end

def event(level, args)
time = Time.now
message = ''
Expand Down Expand Up @@ -310,6 +291,25 @@ def caller_line(time, depth, level)
end
return log_msg
end

private

def dump_stacktrace(backtrace, level)
return if @level > level

time = Time.now
line = caller_line(time, 5, level)
if @suppress_repeated_stacktrace && (Thread.current[:last_repeated_stacktrace] == backtrace)
puts [" ", line, 'suppressed same stacktrace'].join
else
backtrace.each { |msg|
puts [" ", line, msg].join
}
Thread.current[:last_repeated_stacktrace] = backtrace if @suppress_repeated_stacktrace
end

nil
end
end


Expand Down