1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00
هذا الالتزام موجود في:
Adam Cooke
2017-06-02 17:20:27 +01:00
الأصل 83176e7361
التزام 1547022b2a
2 ملفات معدلة مع 11 إضافات و5 حذوفات

عرض الملف

@@ -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

عرض الملف

@@ -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)
@@ -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