6.0.0-beta1
7/5/25

[#10407] Changing log type from file doesn't work
Summary Changing log type from file doesn't work
Queue Horde Base
Queue Version 4.0.8
Type Bug
State Not A Bug
Priority 2. Medium
Owners
Requester jacob-horde (at) vindvejr (dot) dk
Created 08/03/2011 (5085 days ago)
Due
Updated 08/04/2011 (5084 days ago)
Assigned
Resolved 08/04/2011 (5084 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/04/2011 08:59:49 AM Jan Schneider Comment #4 Reply to this comment
1) Clear $conf[log][name]. This avoids users leaving a filename 
there when changing from File to Syslog. On the other hand, when 
changing from File to Syslog and back again, you'll lose the filename.
This is not possible. The complete configuration parsing and updating 
is automated, you cannot simply add some random behavior change for 
one setting.
2) User another variable ($conf[log][syslog] or something). This 
avoids the problem, and makes it possible to keep the 
filename/syslog facility when changing between the different log 
types.
This would be a backward compatibility break, and also breaking 
configuration compatibility with PEAR's Log package (which is less 
important though).
08/04/2011 08:44:53 AM jacob-horde (at) vindvejr (dot) dk Comment #3 Reply to this comment
It's not a filename, it's a syslog facility. It just happens to use 
the same configuration name, that's why the old value is used.
Ooops, sorry, hadn't seen that. However, I still think it's a bug, 
since it's possible to corrupt the configuration by mistake. At least 
it's not really user-friendly. It would be better to do one of the 
following when changing type to syslog:

1) Clear $conf[log][name]. This avoids users leaving a filename there 
when changing from File to Syslog. On the other hand, when changing 
from File to Syslog and back again, you'll lose the filename.

2) User another variable ($conf[log][syslog] or something). This 
avoids the problem, and makes it possible to keep the filename/syslog 
facility when changing between the different log types.
08/04/2011 08:36:31 AM Jan Schneider Comment #2
State ⇒ Not A Bug
Reply to this comment
It's not a filename, it's a syslog facility. It just happens to use 
the same configuration name, that's why the old value is used.
08/03/2011 10:49:24 AM jacob-horde (at) vindvejr (dot) dk Comment #1
Priority ⇒ 2. Medium
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Base
Summary ⇒ Changing log type from file doesn't work
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
In horde4/config/conf.php I have these settings:

$conf['log']['priority'] = 'INFO';
$conf['log']['ident'] = 'HORDE';
$conf['log']['name'] = '/tmp/horde.log';
$conf['log']['params']['append'] = true;
$conf['log']['params']['format'] = 'default';
$conf['log']['type'] = 'file';

Using the Horde configuration under tab "Logging" I now change the 
type from "File" to "Syslog", which will produce the following conf.php:

$conf['log']['priority'] = 'INFO';
$conf['log']['ident'] = 'HORDE';
$conf['log']['name'] = /tmp/horde.log;
$conf['log']['type'] = 'syslog';

This breaks the configuration, since the filename isn't surrounded by 
''. The GUI insists that filename is required, even though the log 
type is now "Syslog". Therefore you have to manually delete the line 
$conf['log']['name'] from conf.php in order the get the installation 
to work again.

Saved Queries