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

Change warning to warn for all log stuff #344

Merged
merged 1 commit into from
Jul 31, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lacci/lib/shoes/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def initialize(
end

Signal.trap("INT") do
@log.warning("App interrupted by signal, stopping...")
@log.warn("App interrupted by signal, stopping...")
puts "\nStopping Shoes app..."
destroy
end
Expand Down
2 changes: 1 addition & 1 deletion lacci/lib/shoes/log.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# an implementation to be plugged in.

module Shoes
LOG_LEVELS = [:debug, :info, :warning, :error, :fatal].freeze
LOG_LEVELS = [:debug, :info, :warn, :error, :fatal].freeze

# Include this module to get a @log instance variable to log as your
# configured component.
Expand Down
6 changes: 1 addition & 5 deletions lib/scarpe/logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def name_to_severity(data)
:debug
when "info"
:info
when "warn", "warning"
when "warn"
:warn
when "err", "error"
:error
Expand Down Expand Up @@ -105,10 +105,6 @@ def configure_logger(log_config)
end
end

class Logging::Logger
alias_method :warning, :warn
end

log_config = if ENV["SCARPE_LOG_CONFIG"]
JSON.load_file(ENV["SCARPE_LOG_CONFIG"])
else
Expand Down
2 changes: 1 addition & 1 deletion lib/scarpe/wv/web_wrangler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def periodic_code(name, interval = heartbeat, &block)
def js_eventually(code)
raise "WebWrangler isn't running, eval doesn't work!" unless @is_running

@log.warning "Deprecated: please do NOT use js_eventually, it's basically never what you want!" unless ENV["CI"]
@log.warn "Deprecated: please do NOT use js_eventually, it's basically never what you want!" unless ENV["CI"]

@webview.eval(code)
end
Expand Down