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
commitcfc3a5ad7be12ee67e1d14df04dc03acc73394f3 (patch)
tree1e8710bee4c7ff29fc13b04cfc38549b1056b748 /util/session.lua
parent3bf4a8eef76681cf3ef9dd4421a045c69cbfe860 (diff)
downloadprosody-cfc3a5ad7be12ee67e1d14df04dc03acc73394f3.tar.gz
prosody-cfc3a5ad7be12ee67e1d14df04dc03acc73394f3.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;
}