# HG changeset patch # User Kim Alvefur # Date 1522943557 -7200 # Node ID dba17a70fd2204e84d092ea7f985b690a46d5998 # Parent 0cb84aafeee6547940fa9ee3818651c1890a7438 util.startup: Initialize prosody.log / _G.log here instead of in loggingmanager to reduce dependencies diff -r 0cb84aafeee6 -r dba17a70fd22 core/loggingmanager.lua --- 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 diff -r 0cb84aafeee6 -r dba17a70fd22 util/startup.lua --- 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;