Changeset

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
parents 8719:0cb84aafeee6
children 8721:b773b15fee71
files core/loggingmanager.lua util/startup.lua
diffstat 2 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/core/loggingmanager.lua	Thu Apr 05 17:41:00 2018 +0200
+++ b/core/loggingmanager.lua	Thu Apr 05 17:52:37 2018 +0200
@@ -20,9 +20,6 @@
 local logger = require "util.logger";
 local prosody = prosody;
 
-_G.log = logger.init("general");
-prosody.log = logger.init("general");
-
 local _ENV = nil;
 -- luacheck: std none
 
--- 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;