diff options
author | Kim Alvefur <zash@zash.se> | 2015-11-24 19:04:54 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-11-24 19:04:54 +0100 |
commit | 0ca40214f40ee021c6b35feac832eff81fb2f3b1 (patch) | |
tree | 1e8710bee4c7ff29fc13b04cfc38549b1056b748 | |
parent | 35fd8b8fda620eb94d0f9d7161cac7fd890db862 (diff) | |
download | prosody-0ca40214f40ee021c6b35feac832eff81fb2f3b1.tar.gz prosody-0ca40214f40ee021c6b35feac832eff81fb2f3b1.zip |
util.session: What does the session say?
-rw-r--r-- | util/session.lua | 8 |
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; } |