diff --git a/config/postal.defaults.yml b/config/postal.defaults.yml index ee9d313..7d237c6 100644 --- a/config/postal.defaults.yml +++ b/config/postal.defaults.yml @@ -34,7 +34,7 @@ logging: root: # Automatically determined based on config root max_log_file_size: 20 max_log_files: 10 - greylog: + graylog: host: port: 12201 diff --git a/lib/postal/app_logger.rb b/lib/postal/app_logger.rb index ebc9cec..b41d0fb 100644 --- a/lib/postal/app_logger.rb +++ b/lib/postal/app_logger.rb @@ -11,7 +11,7 @@ module Postal def add(severity, message = nil, progname = nil) super - if severity >= @level && n = self.class.greylog_notifier + if severity >= @level && n = self.class.graylog_notifier begin if message.nil? message = block_given? ? yield : progname @@ -26,12 +26,12 @@ module Postal true end - def self.greylog? - !!Postal.config.logging.greylog&.host + def self.graylog? + !!Postal.config.logging.graylog&.host end - def self.greylog_notifier - @greylog_notifier ||= greylog? ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil + def self.graylog_notifier + @graylog_notifier ||= graylog? ? GELF::Notifier.new(Postal.config.logging.graylog.host, Postal.config.logging.graylog.port) : nil end end