[horde] Horde logging. Syslog options

Simon Brereton simon.brereton at buongiorno.com
Wed Sep 28 19:34:41 UTC 2011


> -----Original Message-----
> From: horde-bounces at lists.horde.org [mailto:horde-
> bounces at lists.horde.org] On Behalf Of Vilius Šumskas
> Sveiki,
> 
> Wednesday, September 28, 2011, 9:03:38 PM, you wrote:
> 
> >> -----Original Message-----
> >> From: horde-bounces at lists.horde.org [mailto:horde-
> >> bounces at lists.horde.org] On Behalf Of Vilius Šumskas Sveiki,
> >>
> >> Wednesday, September 28, 2011, 6:48:57 PM, you wrote:
> >>
> >> > Hi
> >>
> >> > I'm still not getting anything in the Horde logs.
> >>
> >> > My options are:
> >>
> >> > $conf['log']['priority'] = 'INFO';
> >> > $conf['log']['ident'] = 'HORDE';
> >> > $conf['log']['name'] = '/var/log/horde/horde4.log';
> >> > $conf['log']['params']['append'] = true;
> >> > $conf['log']['params']['format'] = 'default';
> >> $conf['log']['enabled']
> >> > = true; $conf['log_accesskeys'] = false;
> >>
> >> > The apache logs - which are being written are:
> >>
> >> > mail:~# ls /var/log/apache2/logs/
> >> > total 23M
> >> > drwxr-xr-x 2 root root 4.0K Sep  2 19:11 ./
> >> > drwxr-x--- 3 root adm  4.0K Sep 25 06:26 ../
> >> > -rw-r--r-- 1 root root 655K Sep 28 16:21 mydomain-webmail-
> >> access_log
> >> > -rw-r--r-- 1 root root  11K Sep 25 06:26 mydomain-webmail-
> error_log
> >> > -rw-r--r-- 1 root root 356K Sep 28 10:41 ssl_access.log
> >>
> >> > The horde logs which are not being written are:
> >> > mail:~# ls /var/log/horde/
> >> > total 8.0K
> >> > drwxrw----  2 root adm      4.0K Sep 23 18:21 ./
> >> > drwxr-xr-x 13 root root     4.0K Sep 28 06:26 ../
> >> > -rwxrw-rw-  1 root www-data    0 Sep 23 17:51 horde4.log
> >> > -rwxrw-rw-  1 root www-data    0 Sep 23 18:21 sync.log
> >>
> >> > It doesn't matter if I make the group adm or root - nothing gets
> >> > written.  I really can't see why this doesn't work.  But I don't
> >> know
> >> > enough about the Horde logging mechanism and I'm not versed
> enough
> >> in php to go looking.
> >>
> >> What  if  you  chmod  775  /var/log/horde  directory? Or if you
> log
> >> to /var/log/horde4.log directly? Or /tmp/horde4.log ?
> >
> > Good suggestions - and ones I'd been avoiding.  However, it doesn't
> > help.  I tried both your suggestions - restarted Apache each time -
> and still nothing.
> 
> > I really don't understand :)  And no one else appears to be having
> an
> > issue.  I'd give syslog a try, but I don't really want that if I
> can avoid it.
> 
> I don't see $conf['log']['type'] in your configuration. Is it set?

You raise a good point.  In the configuration window I definitely had type chosen as file, but it doesn't seem to have been in the conf.php - I assumed that this was because it was a default and therefore not in there (i.e. I'd noticed its absence but wasn't alarmed by it.

And true enough, if I revert from the syslogging I was just successful, I have an error when I log in:

Horde_Log_Handler_Stream: "/var/log/horde/horde4.log" cannot be opened with mode "a+"

And nothing appears in the Horde log again, even though the permissions on that file are 766 - but at least it's trying now, right :)

My conf.php section now looks like:

 48 $conf['log']['priority'] = 'INFO';
 49 $conf['log']['ident'] = 'HORDE4';
 50 $conf['log']['name'] = '/var/log/horde/horde4.log';
 51 $conf['log']['params']['append'] = true;
 52 $conf['log']['params']['format'] = 'default';
 53 $conf['log']['type'] = 'file';
 54 $conf['log']['enabled'] = true;
 55 $conf['log_accesskeys'] = false;

It's not a big issue now that I can have it working with syslog - but since I'm primarily trying to fix the logging to debug the Activesync having it log to file would be nice.


Simon





More information about the horde mailing list