aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_logger.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_logger.c')
-rw-r--r--src/lua/lua_logger.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lua/lua_logger.c b/src/lua/lua_logger.c
index 8f2f62c03..66c472a27 100644
--- a/src/lua/lua_logger.c
+++ b/src/lua/lua_logger.c
@@ -14,6 +14,8 @@
* limitations under the License.
*/
#include "lua_common.h"
+#include "libutil/map.h"
+#include "libutil/map_private.h"
/***
* @module rspamd_logger
@@ -480,6 +482,21 @@ lua_logger_logx (lua_State *L, GLogLevelFlags level, gboolean is_string)
uid = cfg->checksum;
}
}
+ else if (strcmp (clsname, "rspamd{map}") == 0) {
+ struct rspamd_lua_map *map;
+
+ map = lua_check_map (L, 1);
+
+ if (map) {
+ if (map->map) {
+ uid = map->map->pool->tag.uid;
+ }
+ else {
+ uid = "embedded";
+ }
+ }
+ }
+
/* Metatable, __index, classname */
lua_pop (L, 3);