From 0ca40214f40ee021c6b35feac832eff81fb2f3b1 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 24 Nov 2015 19:04:54 +0100 Subject: util.session: What does the session say? --- util/session.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util/session.lua') 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; } -- cgit v1.2.3