fix(logging): fix spelling of graylog

This commit is contained in:
Adam Cooke
2021-08-02 14:43:06 +00:00
parent 32b42af2f9
commit 2a11e0c0a5
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ logging:
root: # Automatically determined based on config root root: # Automatically determined based on config root
max_log_file_size: 20 max_log_file_size: 20
max_log_files: 10 max_log_files: 10
greylog: graylog:
host: host:
port: 12201 port: 12201
+5 -5
View File
@@ -11,7 +11,7 @@ module Postal
def add(severity, message = nil, progname = nil) def add(severity, message = nil, progname = nil)
super super
if severity >= @level && n = self.class.greylog_notifier if severity >= @level && n = self.class.graylog_notifier
begin begin
if message.nil? if message.nil?
message = block_given? ? yield : progname message = block_given? ? yield : progname
@@ -26,12 +26,12 @@ module Postal
true true
end end
def self.greylog? def self.graylog?
!!Postal.config.logging.greylog&.host !!Postal.config.logging.graylog&.host
end end
def self.greylog_notifier def self.graylog_notifier
@greylog_notifier ||= greylog? ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil @graylog_notifier ||= graylog? ? GELF::Notifier.new(Postal.config.logging.graylog.host, Postal.config.logging.graylog.port) : nil
end end
end end