1
0
مراية لـ 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

هذا الالتزام موجود في:
Adam Cooke
2017-06-02 17:18:19 +01:00
الأصل 0177a7b8de
التزام 83176e7361

عرض الملف

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