diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-25 21:53:42 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-25 23:01:53 +0200 |
commit | df0b2a73076d9168698413d1322d680420d38016 (patch) | |
tree | e04979dd8f575945ace2bfd146a30a6d26da21e4 /src/plugins/lua/phishing.lua | |
parent | c22f1ab8bb3cf373d515ae79888a6f5de87eca7b (diff) | |
download | rspamd-df0b2a73076d9168698413d1322d680420d38016.tar.gz rspamd-df0b2a73076d9168698413d1322d680420d38016.zip |
[Minor] Use new API for debug logging in Lua plugins
Diffstat (limited to 'src/plugins/lua/phishing.lua')
-rw-r--r-- | src/plugins/lua/phishing.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index 1383fcd05..6a16e3225 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -17,6 +17,7 @@ limitations under the License. -- Phishing detection interface for selecting phished urls and inserting corresponding symbol -- -- +local N = 'phishing' local symbol = 'PHISHED_URL' local openphish_symbol = 'PHISHED_OPENPHISH' local phishtank_symbol = 'PHISHED_PHISHTANK' @@ -33,7 +34,7 @@ local openphish_data = {} local phishtank_data = {} local rspamd_logger = require "rspamd_logger" local util = require "rspamd_util" -local opts = rspamd_config:get_all_opt('phishing') +local opts = rspamd_config:get_all_opt(N) if not (opts and type(opts) == 'table') then rspamd_logger.infox(rspamd_config, 'Module is unconfigured') return @@ -137,7 +138,7 @@ local function phishing_cb(task) -- Use distance to penalize the total weight weight = util.tanh(3 * (1 - dist + 0.1)) end - rspamd_logger.debugx(task, "distance: %1 -> %2: %3", tld, ptld, dist) + rspamd_logger.debugm(N, task, "distance: %1 -> %2: %3", tld, ptld, dist) local function found_in_map(map) if #map > 0 then |