Skip to content

Commit

Permalink
fix(logging): fix spelling of graylog
Browse files Browse the repository at this point in the history
  • Loading branch information
adamcooke committed Aug 2, 2021
1 parent 32b42af commit 2a11e0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/postal.defaults.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions lib/postal/app_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def initialize(log_name, *args)

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
Expand All @@ -26,12 +26,12 @@ def add(severity, message = nil, progname = nil)
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

Expand Down

0 comments on commit 2a11e0c

Please sign in to comment.