Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
8719:0cb84aafeee6 | 8720:dba17a70fd22 |
---|---|
1 -- Ignore the CFG_* variables | 1 -- Ignore the CFG_* variables |
2 -- luacheck: ignore 113/CFG_CONFIGDIR 113/CFG_SOURCEDIR 113/CFG_DATADIR 113/CFG_PLUGINDIR | 2 -- luacheck: ignore 113/CFG_CONFIGDIR 113/CFG_SOURCEDIR 113/CFG_DATADIR 113/CFG_PLUGINDIR |
3 local startup = {}; | 3 local startup = {}; |
4 | 4 |
5 local prosody = { events = require "util.events".new() }; | 5 local prosody = { events = require "util.events".new() }; |
6 local log = require "util.logger".init("startup"); | 6 local logger = require "util.logger"; |
7 local log = logger.init("startup"); | |
7 | 8 |
8 local config = require "core.configmanager"; | 9 local config = require "core.configmanager"; |
9 | 10 |
10 local dependencies = require "util.dependencies"; | 11 local dependencies = require "util.dependencies"; |
11 | 12 |
192 | 193 |
193 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR or ".", | 194 prosody.paths = { source = CFG_SOURCEDIR, config = CFG_CONFIGDIR or ".", |
194 plugins = CFG_PLUGINDIR or "plugins", data = "data" }; | 195 plugins = CFG_PLUGINDIR or "plugins", data = "data" }; |
195 | 196 |
196 prosody.arg = _G.arg; | 197 prosody.arg = _G.arg; |
198 | |
199 _G.log = logger.init("general"); | |
200 prosody.log = logger.init("general"); | |
197 | 201 |
198 startup.detect_platform(); | 202 startup.detect_platform(); |
199 startup.detect_installed(); | 203 startup.detect_installed(); |
200 _G.prosody = prosody; | 204 _G.prosody = prosody; |
201 end | 205 end |