Software /
code /
prosody
Changeset
5175:fabaed7418a6
mod_posix: Remove console and stdout logging sinks before daemonizing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 10 Nov 2012 23:39:22 +0100 |
parents | 5173:b22d24b5a89a |
children | 5176:7d0a8b255a37 |
files | plugins/mod_posix.lua |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_posix.lua Wed Oct 24 19:05:56 2012 +0200 +++ b/plugins/mod_posix.lua Sat Nov 10 23:39:22 2012 +0100 @@ -136,8 +136,16 @@ 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() + remove_log_sinks(); local ok, ret = pposix.daemonize(); if not ok then module:log("error", "Failed to daemonize: %s", ret);