Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.14.4

Bug #12734 Issue is SQL Logger - does not correctly accept new log statement
Submitted: 2007-12-20 12:56 UTC
From: elambe Assigned: jon
Status: Closed Package: Log (version 1.9.13)
PHP Version: 5.2.0 OS: Win32
Roadmaps: 1.9.14    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 49 + 43 = ?

 
 [2007-12-20 12:56 UTC] elambe (Ed Lambe)
Description: ------------ My client is using a sybase database (why I don't know) and I have encountered the following issue. In sybase the timestamp field is automatically updated by the system and as a result I need to create my own sql statement to facilitate logging. The code within the sql.php file should recognize the new sql statement and use this instead of the default. However there is a code error which does not allow this to happen. /* Now that we have a table name, assign our SQL statement. */ /*Original line */ //if (!empty($this->_sql)) { /*New Line - taking the user entered sql statement */ if (!empty($conf['sql'])) { Test script: --------------- function logger() { $conf=array('dsn' => DSN, 'sql' => 'INSERT INTO LOG_TABLE (id, ident, priority, message) VALUES(?, ?, ?, ?)' ); $logger = Log::singleton('sql', 'LOG_TABLE', 'ident', $conf); /* Set the Log Level */ $mask = Log::UPTO(PEAR_LOG_DEBUG); $logger->setMask($mask); for ($i = 0; $i < 20; $i++) { $logger->log("Log entry $i"); } $logger->close(); }

Comments

 [2007-12-23 20:32 UTC] jon (Jon Parise)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.