مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2026-01-17 21:39:47 +00:00
tidy greylog
هذا الالتزام موجود في:
@@ -41,6 +41,9 @@ 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:
|
||||||
|
host:
|
||||||
|
port: 12201
|
||||||
|
|
||||||
message_db:
|
message_db:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
|
|||||||
@@ -3,11 +3,6 @@ require 'logger'
|
|||||||
module Postal
|
module Postal
|
||||||
class AppLogger < Logger
|
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)
|
def initialize(log_name, *args)
|
||||||
@log_name = log_name
|
@log_name = log_name
|
||||||
super(*args)
|
super(*args)
|
||||||
@@ -33,6 +28,14 @@ module Postal
|
|||||||
end
|
end
|
||||||
true
|
true
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
class LogFormatter
|
class LogFormatter
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم