Software /
code /
prosody
Comparison
util/startup.lua @ 8666:57780ba1938f
util.startup: Move original_logging_config to a local variable
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 22 Mar 2018 21:46:55 +0000 |
parent | 8665:4b260a3f8b94 |
child | 8667:a05d36075c6a |
comparison
equal
deleted
inserted
replaced
8665:4b260a3f8b94 | 8666:57780ba1938f |
---|---|
6 | 6 |
7 local config = require "core.configmanager"; | 7 local config = require "core.configmanager"; |
8 local async = require "util.async"; | 8 local async = require "util.async"; |
9 | 9 |
10 local dependencies = require "util.dependencies"; | 10 local dependencies = require "util.dependencies"; |
11 | |
12 local original_logging_config; | |
11 | 13 |
12 function startup.read_config() | 14 function startup.read_config() |
13 local filenames = {}; | 15 local filenames = {}; |
14 | 16 |
15 local filename; | 17 local filename; |
351 prosody.events.fire_event("server-started"); | 353 prosody.events.fire_event("server-started"); |
352 end | 354 end |
353 | 355 |
354 -- Override logging config (used by prosodyctl) | 356 -- Override logging config (used by prosodyctl) |
355 function startup.force_console_logging() | 357 function startup.force_console_logging() |
356 local original_logging_config = config.get("*", "log"); | 358 original_logging_config = config.get("*", "log"); |
357 config.set("*", "log", { { levels = { min="info" }, to = "console" } }); | 359 config.set("*", "log", { { levels = { min="info" }, to = "console" } }); |
358 end | 360 end |
359 | 361 |
360 function startup.switch_user() | 362 function startup.switch_user() |
361 -- Switch away from root and into the prosody user -- | 363 -- Switch away from root and into the prosody user -- |