Re: PEAR::Log & mdb2
| From: | Irimia, Suleapa | Date: | Sat, 20 Oct 2007 19:31:00 +0000 |
| Subject: | Re: PEAR::Log & mdb2 | ||
| References: | 1 2 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-28107@lists.php.net to get a copy of this message | ||
brian wrote:
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s
Irimia, Suleapa wrote:It seems that is working if i choose to display it and not to store it in db ... -- $logger = &Log::singleton('display', 'log_table', 'System', $logConfig); --Hello, Can someone tell me what is wrong here please? -- define('BASE_PEAR_DSN','mysql://root:pass@localhost/db'); if(is_includeable('Log.php')) {For sanity checking, you should add this, just to make sure you're getting past that hump: if (is_includeable('Log.php')) { ... } else {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,echo 'cannot include Log.php';} Hello,
Attachment: [application/x-pkcs7-signature] S/MIME Cryptographic Signature smime.p7s