Skip to content
Snippets Groups Projects
Commit 1547022b authored by Adam Cooke's avatar Adam Cooke
Browse files

tidy greylog

parent 83176e73
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -41,6 +41,9 @@ logging:
root: # Automatically determined based on config root
max_log_file_size: 20
max_log_files: 10
greylog:
host:
port: 12201
 
message_db:
host: 127.0.0.1
Loading
Loading
Loading
Loading
@@ -3,11 +3,6 @@ require 'logger'
module Postal
class AppLogger < Logger
 
def self.greylog_notifier
@greylog_notifier ||= Postal.config.logging.greylog ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil
end
def initialize(log_name, *args)
@log_name = log_name
super(*args)
Loading
Loading
@@ -33,6 +28,14 @@ module Postal
end
true
end
def self.greylog?
!!Postal.config.logging.greylog&.host
end
def self.greylog_notifier
@greylog_notifier ||= greylog? ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil
end
end
 
class LogFormatter
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment