[horde] Trying to setup MySql logging
Jan Schneider
jan at horde.org
Mon Nov 15 01:56:38 PST 2004
Zitat von Kevin Reed <reedkm at comcast.net>:
> Each of the above works well, but now I am trying to set up logging via
> mysql.
> I have the following in the logging section of /horde/config/horde.php:
>
> $conf['log']['enabled'] = true;
> $conf['log']['type'] = 'sql';
> $conf['log']['name'] = 'horde_log';
> $conf['log']['priority'] = LOG_NOTICE;
> $conf['log']['ident'] = 'HORDE';
> $conf['log']['params'] = array();
> $conf['log']['params']['username'] = 'horde';
> $conf['log']['params']['password'] = 'my_horde_pass';
> $conf['log']['params']['database'] = 'horde';
> $conf['log']['params']['hostspec'] = 'localhost';
>
> I created the table horde.horde_log with the following command (as listed in
> my
> /usr/share/pear/Log/sql.php):
>
> CREATE TABLE horde_log (
> id INT NOT NULL,
> logtime TIMESTAMP NOT NULL,
> ident CHAR(16) NOT NULL,
> priority INT NOT NULL,
> message VARCHAR(200),
> PRIMARY KEY (id)
> );
>
> The database user horde has SELECT, INSERT, UPDATE, DELETE, CREATE, DROP
> privs on table horde_log
>
> When I log in (using IMP for authentication), I get
> "Notice: Undefined index: dsn in /usr/share/pear/Log/sql.php on line 117
The SQL Log backend needs different parameters than the Horde SQL backends.
See the documentation on http://pear.php.net/Log
Jan.
--
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
More information about the horde
mailing list