class RailsAutoscaleAgent::LoggerProxy
Constants
- TAG
Public Instance Methods
debug(msg)
click to toggle source
# File lib/rails_autoscale_agent/logger.rb, line 28 def debug(msg) # Silence debug logs by default to avoiding being overly chatty (Rails logger defaults # to DEBUG level in production). Setting RAILS_AUTOSCALE_DEBUG=true enables debug logs, # even if the underlying logger severity level is INFO. if Config.instance.debug? if logger.respond_to?(:debug?) && logger.debug? logger.debug tag(msg) elsif logger.respond_to?(:info?) && logger.info? logger.info tag("[DEBUG] #{msg}") end end end
error(msg)
click to toggle source
# File lib/rails_autoscale_agent/logger.rb, line 16 def error(msg) logger.error tag(msg) end
info(msg)
click to toggle source
# File lib/rails_autoscale_agent/logger.rb, line 24 def info(msg) logger.info tag(msg) unless Config.instance.quiet? end
warn(msg)
click to toggle source
# File lib/rails_autoscale_agent/logger.rb, line 20 def warn(msg) logger.warn tag(msg) end
Private Instance Methods
tag(msg)
click to toggle source
# File lib/rails_autoscale_agent/logger.rb, line 43 def tag(msg) "#{TAG} #{msg}" end