# HG changeset patch # User Kim Alvefur # Date 1448388294 -3600 # Node ID a9ae0c6ac4f4ed01f1ac232ecd84c361233ef33e # Parent 9df70e9e006b4622c9a6cc963917392bb02a2086 util.session: What does the session say? diff -r 9df70e9e006b -r a9ae0c6ac4f4 util/session.lua --- a/util/session.lua Tue Nov 24 19:09:51 2015 +0100 +++ b/util/session.lua Tue Nov 24 19:04:54 2015 +0100 @@ -1,3 +1,4 @@ +local logger = require "util.logger"; local function new_session(typ) local session = { @@ -12,7 +13,14 @@ 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; }