aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cfg_file.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-30 12:35:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-30 12:35:07 +0100
commit2308f4059c052ab4248c369305c2440468797105 (patch)
tree46affb801b2562ddc3ad6bf40781f1fb586fc428 /src/lua/lua_cfg_file.c
parentaf05d946e5cdd634d05434ebd294f0a31264645b (diff)
downloadrspamd-2308f4059c052ab4248c369305c2440468797105.tar.gz
rspamd-2308f4059c052ab4248c369305c2440468797105.zip
Update lua code for the new logger.
Diffstat (limited to 'src/lua/lua_cfg_file.c')
-rw-r--r--src/lua/lua_cfg_file.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lua/lua_cfg_file.c b/src/lua/lua_cfg_file.c
index 049118504..bc9bdb3ac 100644
--- a/src/lua/lua_cfg_file.c
+++ b/src/lua/lua_cfg_file.c
@@ -67,7 +67,7 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
*score = lua_tonumber (L, -1);
}
else {
- msg_warn ("cannot get weight of symbol: %s", symbol);
+ msg_warn_config("cannot get weight of symbol: %s", symbol);
continue;
}
lua_pop (L, 1);
@@ -85,13 +85,13 @@ lua_process_metric (lua_State *L, const gchar *name, struct rspamd_config *cfg)
*score = lua_tonumber (L, -1);
}
else {
- msg_warn ("cannot get weight of symbol: %s", symbol);
+ msg_warn_config("cannot get weight of symbol: %s", symbol);
continue;
}
/* Insert symbol */
if ((s =
g_hash_table_lookup (metric->symbols, symbol)) != NULL) {
- msg_info ("replacing weight for symbol %s: %.2f -> %.2f",
+ msg_info_config("replacing weight for symbol %s: %.2f -> %.2f",
symbol,
*s->weight_ptr,
*score);
@@ -184,7 +184,7 @@ rspamd_lua_post_load_config (struct rspamd_config *cfg)
sym = rspamd_mempool_strdup (cfg->cfg_pool, name);
if (!rspamd_parse_expression (val, 0, &composite_expr_subr, NULL,
cfg->cfg_pool, &err, &expr)) {
- msg_err ("cannot parse composite expression '%s': %s", val,
+ msg_err_config("cannot parse composite expression '%s': %s", val,
err->message);
g_error_free (err);
err = NULL;
@@ -194,7 +194,7 @@ rspamd_lua_post_load_config (struct rspamd_config *cfg)
if ((old_expr =
g_hash_table_lookup (cfg->composite_symbols,
name)) != NULL) {
- msg_info ("replacing composite symbol %s", name);
+ msg_info_config("replacing composite symbol %s", name);
g_hash_table_replace (cfg->composite_symbols, sym, expr);
}
else {
@@ -285,14 +285,14 @@ rspamd_lua_check_condition (struct rspamd_config *cfg, const gchar *condition)
g_strlcat (condbuf, condition, hostlen);
/* Evaluate condition */
if (luaL_dostring (L, condbuf) != 0) {
- msg_err ("eval of '%s' failed: '%s'", condition, lua_tostring (L, -1));
+ msg_err_config("eval of '%s' failed: '%s'", condition, lua_tostring (L, -1));
g_free (condbuf);
return FALSE;
}
/* Get global variable res to get result */
lua_getglobal (L, FAKE_RES_VAR);
if (!lua_isboolean (L, -1)) {
- msg_err ("bad string evaluated: %s, type: %s", condbuf,
+ msg_err_config("bad string evaluated: %s, type: %s", condbuf,
lua_typename (L, lua_type (L, -1)));
g_free (condbuf);
return FALSE;