Software /
code /
prosody
Comparison
plugins/mod_posix.lua @ 594:6d9b2da9888f
Small logging adjustment for mod_posix
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 07 Dec 2008 03:12:56 +0000 |
parent | 587:43f509a1519a |
child | 722:63456c9d0522 |
comparison
equal
deleted
inserted
replaced
593:121d82243023 | 594:6d9b2da9888f |
---|---|
33 log("error", "Failed to daemonize: %s", ret); | 33 log("error", "Failed to daemonize: %s", ret); |
34 elseif ret and ret > 0 then | 34 elseif ret and ret > 0 then |
35 log("info", "Daemonized to pid %d", ret); | 35 log("info", "Daemonized to pid %d", ret); |
36 os.exit(0); | 36 os.exit(0); |
37 else | 37 else |
38 log("info", "Successfully daemonized"); | |
39 | |
40 if logwriter then | 38 if logwriter then |
41 local ok, ret = logger_set(logwriter); | 39 local ok, ret = logger_set(logwriter); |
42 if not ok then | 40 if not ok then |
43 log("error", "Couldn't set new log output: %s", ret); | 41 log("error", "Couldn't set new log output: %s", ret); |
44 end | 42 end |
45 end | 43 end |
46 | 44 log("info", "Successfully daemonized"); |
47 end | 45 end |
48 end | 46 end |
49 module:add_event_hook("server-starting", daemonize_server); | 47 module:add_event_hook("server-starting", daemonize_server); |
50 end | 48 end |