مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
only submit entries to greylog that apply to the current level
هذا الالتزام موجود في:
@@ -3,7 +3,6 @@ require 'logger'
|
|||||||
module Postal
|
module Postal
|
||||||
class AppLogger < Logger
|
class AppLogger < Logger
|
||||||
|
|
||||||
|
|
||||||
def self.greylog_notifier
|
def self.greylog_notifier
|
||||||
@greylog_notifier ||= Postal.config.logging.greylog ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil
|
@greylog_notifier ||= Postal.config.logging.greylog ? GELF::Notifier.new(Postal.config.logging.greylog.host, Postal.config.logging.greylog.port) : nil
|
||||||
|
|
||||||
@@ -17,7 +16,7 @@ module Postal
|
|||||||
|
|
||||||
def add(severity, message = nil, progname = nil)
|
def add(severity, message = nil, progname = nil)
|
||||||
super
|
super
|
||||||
if n = self.class.greylog_notifier
|
if severity >= @level && n = self.class.greylog_notifier
|
||||||
begin
|
begin
|
||||||
if message.nil?
|
if message.nil?
|
||||||
message = block_given? ? yield : progname
|
message = block_given? ? yield : progname
|
||||||
|
|||||||
المرجع في مشكلة جديدة
حظر مستخدم