#232 documented log directives fail to split between syslog and debug file
Reporter
theanarcat
Owner
MattJ
Created
Updated
Stars
★ (1)
Tags
Priority-Medium
Status-Fixed
Type-Other
theanarcat
on
*What steps will reproduce the problem?*
1. setup 1.0-rc7
2. setup log configuration according to http://prosody.im/doc/logging, more specifically:
Host "*"
modules_enabled = {
"posix";
-- ...
}
log = {
{ levels = { min = "debug" }, to = "file", filename = "/var/log/prosody/prosody.log" };
{ levels = { min = "info" }, to = "*syslog" };
}
What is the expected output?
all log information written to the file, only info and above to syslog
What do you see instead?
all log information written to the file, no information logged to syslog
*What version of the product are you using? On what operating system?*
0.7-rc1 on Debian lenny. Probably patched up to make cyrus authentication work, i don't recall clearly. see this page for my digging around when originally setting up that server:
https://wiki.koumbit.net/ProsodyConfiguration#LDAP_support
*Please provide any additional information below.*
theanarcat
on
Note that switching to "syslog" instead of "*syslog" didn't work either.
theanarcat
on
If I configure logging to be just:
log = "*syslog"
that actually works and sends logs into daemon.log. But with the above config, nothing gets written to daemon.log or any other syslog place I could find. Example:
In prosody.log:
Apr 13 11:28:34 s2sinbf7050 info s2s disconnected: nil->koumbit.org (connection-timeout)
Apr 13 11:28:34 s2sinbf7050 info Destroying incoming session nil->koumbit.org
In daemon.log, there's nothing.
paul.aurich
on
This was fixed by changing to "syslog" from "*syslog" (per my suggestion) and restarting Prosody.
Matthew, why the difference here in "*syslog" vs. "syslog"? (The docs could use an example of this)
theanarcat
on
So part of the problem here is that SIGHUP doesn't change the log configuration, so that made this whole thing hard to diagnose.
The following config actually works:
log = {
{ levels = { min = "debug" }, to = "file", filename = "/var/log/prosody/prosody.log" };
{ levels = { min = "warn" }, to = "syslog" };
}
... but you need a full server restart.
At the very least the documentation should be updated so that the star is removed from syslog...
I'll open a separate issue about rereading the log config when reloading.
MattJ
on
SIGHUP does reload the logging configuration (0.8+).
This issue report is mainly based on a misunderstanding of Prosody's logging format. Thankfully a while back I added support for a much simpler format and updated the default config to use it in 0.8. I've just updated the docs to describe this new format, and although the advanced format remains supported I have moved it to a separate documentation page to avoid confusion.
http://prosody.im/doc/logginghttp://prosody.im/doc/advanced_logging
*What steps will reproduce the problem?* 1. setup 1.0-rc7 2. setup log configuration according to http://prosody.im/doc/logging, more specifically: Host "*" modules_enabled = { "posix"; -- ... } log = { { levels = { min = "debug" }, to = "file", filename = "/var/log/prosody/prosody.log" }; { levels = { min = "info" }, to = "*syslog" }; } What is the expected output? all log information written to the file, only info and above to syslog What do you see instead? all log information written to the file, no information logged to syslog *What version of the product are you using? On what operating system?* 0.7-rc1 on Debian lenny. Probably patched up to make cyrus authentication work, i don't recall clearly. see this page for my digging around when originally setting up that server: https://wiki.koumbit.net/ProsodyConfiguration#LDAP_support *Please provide any additional information below.*
Note that switching to "syslog" instead of "*syslog" didn't work either.
If I configure logging to be just: log = "*syslog" that actually works and sends logs into daemon.log. But with the above config, nothing gets written to daemon.log or any other syslog place I could find. Example: In prosody.log: Apr 13 11:28:34 s2sinbf7050 info s2s disconnected: nil->koumbit.org (connection-timeout) Apr 13 11:28:34 s2sinbf7050 info Destroying incoming session nil->koumbit.org In daemon.log, there's nothing.
This was fixed by changing to "syslog" from "*syslog" (per my suggestion) and restarting Prosody. Matthew, why the difference here in "*syslog" vs. "syslog"? (The docs could use an example of this)
So part of the problem here is that SIGHUP doesn't change the log configuration, so that made this whole thing hard to diagnose. The following config actually works: log = { { levels = { min = "debug" }, to = "file", filename = "/var/log/prosody/prosody.log" }; { levels = { min = "warn" }, to = "syslog" }; } ... but you need a full server restart. At the very least the documentation should be updated so that the star is removed from syslog... I'll open a separate issue about rereading the log config when reloading.
SIGHUP does reload the logging configuration (0.8+). This issue report is mainly based on a misunderstanding of Prosody's logging format. Thankfully a while back I added support for a much simpler format and updated the default config to use it in 0.8. I've just updated the docs to describe this new format, and although the advanced format remains supported I have moved it to a separate documentation page to avoid confusion. http://prosody.im/doc/logging http://prosody.im/doc/advanced_logging
ChangesType-DefectType-Other Status-Fixed