From 6b3012f8d761b563330e99ddbbfe07f714767436 Mon Sep 17 00:00:00 2001 From: Artem Sheremet Date: Tue, 28 Feb 2012 02:31:32 +0300 Subject: [PATCH] Fixed an error in ejabberd_scanlog plugin --- plugins/ejabberd/ejabberd_scanlog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/ejabberd/ejabberd_scanlog b/plugins/ejabberd/ejabberd_scanlog index 1daf8626..724ff459 100755 --- a/plugins/ejabberd/ejabberd_scanlog +++ b/plugins/ejabberd/ejabberd_scanlog @@ -55,7 +55,7 @@ LABELS = { :other_sql_cmd_timeout => 'Other sql_cmd timeout', :UNKNOWN => 'Unknown error/warning' } -def log_type(text) +def log_type(text, debug_mode) if text.include? 'ejabberd_odbc_sup' :ejabberd_odbc_failure elsif text.include? "mod_pubsub_odbc,'-unsubscribe" @@ -99,7 +99,7 @@ new_data.split("\n=").each { |report| next unless type and time and text log_info[type] = (log_info[type] || 0) + 1 - if sub_type = log_type(text) + if sub_type = log_type(text, debug_mode) log_info[sub_type] = (log_info[sub_type] || 0) + 1 end }