Diff

util/startup.lua @ 8720:dba17a70fd22

util.startup: Initialize prosody.log / _G.log here instead of in loggingmanager to reduce dependencies
author Kim Alvefur <zash@zash.se>
date Thu, 05 Apr 2018 17:52:37 +0200
parent 8719:0cb84aafeee6
child 8721:b773b15fee71
line wrap: on
line diff
--- a/util/startup.lua	Thu Apr 05 17:41:00 2018 +0200
+++ b/util/startup.lua	Thu Apr 05 17:52:37 2018 +0200
@@ -3,7 +3,8 @@
 local startup = {};
 
 local prosody = { events = require "util.events".new() };
-local log = require "util.logger".init("startup");
+local logger = require "util.logger";
+local log = logger.init("startup");
 
 local config = require "core.configmanager";
 
@@ -195,6 +196,9 @@
 
 	prosody.arg = _G.arg;
 
+	_G.log = logger.init("general");
+	prosody.log = logger.init("general");
+
 	startup.detect_platform();
 	startup.detect_installed();
 	_G.prosody = prosody;