diff options
author | Kim Alvefur <zash@zash.se> | 2012-11-11 23:48:38 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-11-11 23:48:38 +0100 |
commit | 80711fd402439eb00afef9411334b72f6e615647 (patch) | |
tree | 6367ad48930ec474c7797b1f53089e0e52c684a2 /plugins/mod_posix.lua | |
parent | bf9a3cef1f71ed3e0b6cae0b082cb339b47ed01d (diff) | |
parent | 3e7cd680929dd2c391da21a940a4fc9e1b5663be (diff) | |
download | prosody-80711fd402439eb00afef9411334b72f6e615647.tar.gz prosody-80711fd402439eb00afef9411334b72f6e615647.zip |
Merge 0.9 -> trunk
Diffstat (limited to 'plugins/mod_posix.lua')
-rw-r--r-- | plugins/mod_posix.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index db594ccc..e871e5cf 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -136,8 +136,17 @@ if daemonize == nil then end end +local function remove_log_sinks() + local lm = require "core.loggingmanager"; + lm.register_sink_type("console", nil); + lm.register_sink_type("stdout", nil); + lm.reload_logging(); +end + if daemonize then local function daemonize_server() + module:log("info", "Prosody is about to detach from the console, disabling further console output"); + remove_log_sinks(); local ok, ret = pposix.daemonize(); if not ok then module:log("error", "Failed to daemonize: %s", ret); |