aboutsummaryrefslogtreecommitdiffstats
path: root/util/session.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-11-24 19:04:54 +0100
committerKim Alvefur <zash@zash.se>2015-11-24 19:04:54 +0100
commit0ca40214f40ee021c6b35feac832eff81fb2f3b1 (patch)
tree1e8710bee4c7ff29fc13b04cfc38549b1056b748 /util/session.lua
parent35fd8b8fda620eb94d0f9d7161cac7fd890db862 (diff)
downloadprosody-0ca40214f40ee021c6b35feac832eff81fb2f3b1.tar.gz
prosody-0ca40214f40ee021c6b35feac832eff81fb2f3b1.zip
util.session: What does the session say?
Diffstat (limited to 'util/session.lua')
-rw-r--r--util/session.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/session.lua b/util/session.lua
index 6993842c..7703c265 100644
--- a/util/session.lua
+++ b/util/session.lua
@@ -1,3 +1,4 @@
+local logger = require "util.logger";
local function new_session(typ)
local session = {
@@ -12,7 +13,14 @@ local function set_id(session)
return session;
end
+local function set_logger(session)
+ local log = logger.init(id);
+ session.log = log;
+ return session;
+end
+
return {
new = new_session;
set_id = set_id;
+ set_logger = set_logger;
}