Changeset

6939:a9ae0c6ac4f4

util.session: What does the session say?
author Kim Alvefur <zash@zash.se>
date Tue, 24 Nov 2015 19:04:54 +0100
parents 6938:9df70e9e006b
children 6940:2be5e19485aa
files util/session.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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;
 }