Sqlite wrapper for Log package
| From: | Bertrand Mansion | Date: | Sat, 03 Jan 2004 23:58:36 +0000 |
| Subject: | Sqlite wrapper for Log package | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-24731@lists.php.net to get a copy of this message | ||
Hi Jon,
I have made a concrete Log class for the Log package that logs to an sqlite
database.
It uses the native PHP sqlite functions so it is faster than the DB package
(which anyway I couldn't make work due to a PEAR Error being raised when the
database is set to persistent because of a missing 'persistent' option in
the options instance var).
It uses native sqlite support for row ids and dates.
For more info on dates with sqlite, see:
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
Using Sqlite for logging is probably very interesting because it allows you
to do sql queries on your logs, for example to generate statistics, and as
sqlite is very fast (and soon to be integrated by default in PHP), it seems
to be the most appropriate DB for logging.
So, feel free to add this class to your Log package :)
Here it is:
http://www.mamasam.com/pear/sqlite.phps
Bertrand Mansion
Mamasam