For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > October 2007 > PEAR::Log & mdb2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author PEAR::Log & mdb2
Irimia, Suleapa

2007-10-20, 7:04 pm

Hello,

Can someone tell me what is wrong here please?

--
define('BASE_PEAR_DSN','mysql://root:pass@localhost/db');

if(is_includeable('Log.php')) {
require_once('Log.php');

$logConfig = array('dsn' => BASE_PEAR_DSN);

$logger = &Log::singleton('mdb2', 'log_table', 'System',
$logConfig);
if (PEAR::isError($logger)) {
die($logger->getMessage());
}
$logger->log('logging an event' . PEAR_LOG_DEBUG);
}
--

I can't see anything in log_table and i don't know what is wrong here.
Many thanks,

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com