Software /
code /
prosody
Comparison
util/startup.lua @ 8882:a420b386a72a
Merge 0.10->trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 07 Jun 2018 11:24:29 +0100 |
parent | 8756:2db9c9e3adc1 |
child | 8958:b10a37f6f75f |
comparison
equal
deleted
inserted
replaced
8879:4dee8c439afc | 8882:a420b386a72a |
---|---|
372 end | 372 end |
373 | 373 |
374 -- Override logging config (used by prosodyctl) | 374 -- Override logging config (used by prosodyctl) |
375 function startup.force_console_logging() | 375 function startup.force_console_logging() |
376 original_logging_config = config.get("*", "log"); | 376 original_logging_config = config.get("*", "log"); |
377 config.set("*", "log", { { levels = { min="info" }, to = "console" } }); | 377 config.set("*", "log", { { levels = { min = os.getenv("PROSODYCTL_LOG_LEVEL") or "info" }, to = "console" } }); |
378 end | 378 end |
379 | 379 |
380 function startup.switch_user() | 380 function startup.switch_user() |
381 -- Switch away from root and into the prosody user -- | 381 -- Switch away from root and into the prosody user -- |
382 -- NOTE: This function is only used by prosodyctl. | 382 -- NOTE: This function is only used by prosodyctl. |