From: Vsevolod Stakhov Date: Sun, 4 Sep 2016 18:58:04 +0000 (+0100) Subject: [Minor] Use infox instead of info in logging X-Git-Tag: 1.4.0~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d0ad063163e6b1b4b91480574c126fce5f14a92;p=thirdparty%2Frspamd.git [Minor] Use infox instead of info in logging --- diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua index 5fab04d8f1..74672af271 100644 --- a/src/plugins/lua/asn.lua +++ b/src/plugins/lua/asn.lua @@ -75,7 +75,7 @@ local configure_asn_module = function() local opts = rspamd_config:get_all_opt('asn') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for k,v in pairs(opts) do diff --git a/src/plugins/lua/dcc.lua b/src/plugins/lua/dcc.lua index ae6a3661a8..7c3616073c 100644 --- a/src/plugins/lua/dcc.lua +++ b/src/plugins/lua/dcc.lua @@ -117,7 +117,7 @@ end -- Configuration if opts and opts['host'] then if opts['enabled'] == false then - logger.info('Module is disabled') + logger.infox(rspamd_config, 'module is disabled') return end rspamd_config:register_symbol({ diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 8d04c4fbb9..f2faef89fd 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -329,7 +329,7 @@ if not opts or type(opts) ~= 'table' then end if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 74358d1e21..3d0fddd6aa 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -82,7 +82,7 @@ end local opts = rspamd_config:get_all_opt('emails', 'rule') if opts and type(opts) == 'table' then if opts['enabled'] == false then - logger.info('Module is disabled') + logger.infox(rspamd_config, 'module is disabled') return end local r = opts['rule'] diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index 5b7d71fc43..4c52295b9d 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -73,7 +73,7 @@ end local opts = rspamd_config:get_all_opt('forged_recipients') if opts then if opts['enabled'] == false then - logger.info('Module is disabled') + logger.infox(rspamd_config, 'Module is disabled') return end if opts['symbol_rcpt'] or opts['symbol_sender'] then diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index ddb2da6028..71a8a86cae 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -322,7 +322,7 @@ end local opts = rspamd_config:get_all_opt('greylist') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end if opts['whitelisted_ip'] then diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index fad7156071..b11b567b74 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -482,7 +482,7 @@ local symbols_from = { local opts = rspamd_config:get_all_opt('hfilter') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for k,v in pairs(opts) do diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index 12430241b9..bb6119bdaf 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -318,7 +318,7 @@ local configure_ip_score_module = function() local opts = rspamd_config:get_all_opt('ip_score') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for k,v in pairs(opts) do diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index 96807cd3de..4ec0a41f17 100644 --- a/src/plugins/lua/maillist.lua +++ b/src/plugins/lua/maillist.lua @@ -273,7 +273,7 @@ end local opts = rspamd_config:get_all_opt('maillist') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end if opts['symbol'] then diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index c6fb499dff..ad725820b7 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -201,7 +201,7 @@ end local opts = rspamd_config:get_all_opt('mime_types') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for k,v in pairs(opts) do diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 7cba9fd3a6..a1333d7d9a 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -775,7 +775,7 @@ end local opts = rspamd_config:get_all_opt('multimap') if opts and type(opts) == 'table' then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end redis_params = rspamd_parse_redis_server('multimap') diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 3012205d6d..84b0e48b44 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -143,7 +143,7 @@ end local opts = rspamd_config:get_all_opt('once_received') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end if opts['symbol'] then diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index c4ccfca3ce..e38ceeac97 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -334,6 +334,9 @@ local function phishtank_json_cb(string) end if opts then + if opts['enabled'] == false then + rspamd_logger.infox(rspamd_config, 'module is disabled') + end if opts['symbol'] then symbol = opts['symbol'] -- Register symbol's callback diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index a92c03d3a1..2e67a55244 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -443,7 +443,7 @@ end local opts = rspamd_config:get_all_opt('ratelimit') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end local rates = opts['limit'] diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index d782d1c259..f22199b63a 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -388,7 +388,7 @@ local opts = rspamd_config:get_all_opt('rbl') if not (opts and type(opts) == 'table') then rspamd_logger.info('Module is unconfigured') elseif opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index 39eb3705b8..d6793a3d87 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -110,10 +110,10 @@ end local opts = rspamd_config:get_all_opt('replies') if opts then if not (opts and type(opts) == 'table') then - rspamd_logger.info('Module is unconfigured') + rspamd_logger.infox(rspamd_config, 'module is unconfigured') return elseif opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end redis_params = rspamd_parse_redis_server('replies') diff --git a/src/plugins/lua/rspamd_update.lua b/src/plugins/lua/rspamd_update.lua index c4f1a7e987..779cec2ddc 100644 --- a/src/plugins/lua/rspamd_update.lua +++ b/src/plugins/lua/rspamd_update.lua @@ -126,7 +126,7 @@ end local section = rspamd_config:get_all_opt("rspamd_update") if section then if section['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end local trusted_key diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 783255b89e..927efbc26c 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -131,7 +131,7 @@ end local opts = rspamd_config:get_all_opt("trie") if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for sym, opt in pairs(opts) do diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index b0b00114ec..7344a1d67a 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -186,14 +186,14 @@ local configure_whitelist_module = function() local opts = rspamd_config:get_all_opt('whitelist') if opts then if opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'module is disabled') return end for k,v in pairs(opts) do options[k] = v end else - rspamd_logger.info('Module is unconfigured') + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') return end