Skip to content

Commit

Permalink
Merge pull request #344 from scarpe-team/warn_vs_warning
Browse files Browse the repository at this point in the history
Change warning to warn for all log stuff
  • Loading branch information
Schwad authored Jul 31, 2023
2 parents ce5c22e + 0c30059 commit 1f3f92c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
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

0 comments on commit 1f3f92c

Please sign in to comment.