7594:
В lmbHttpRequest добавлены методы getFiltered(), getGetFiltered(), getPostFiltered()
7595:
Добавил профайлинг в env-функции, добавлены тесты на них
Модератор: phpBB2 - administrators
Index: log/src/lmbLog.class.php
===================================================================
--- log/src/lmbLog.class.php (revision 7644)
+++ log/src/lmbLog.class.php (working copy)
@@ -25,6 +25,13 @@
protected $logs = array();
protected $log_writers = array();
protected $allowed_levels = array();
+ protected $backtrace_depth = array(
+ 'notice' => 1,
+ 'warning' => 1,
+ 'info' => 3,
+ 'error' => 5,
+ 'exception' => 5
+ );
function __construct()
{
@@ -81,13 +88,17 @@
return sizeof($this->logs);
}
+ function setBacktraceDepth($log_level, $depth) {
+ $this->backtrace_depth[$log_level] = $depth;
+ }
+
function notice($message, $params = array(), $backtrace = null)
{
if(!$this->isLogEnabled())
return;
if(!$backtrace)
- $backtrace = new lmbBacktrace(1);
+ $backtrace = new lmbBacktrace($this->backtrace_depth['notice']);
$this->_write(lmbLog :: NOTICE, $message, $params, $backtrace);
}
@@ -98,7 +109,7 @@
return;
if(!$backtrace)
- $backtrace = new lmbBacktrace(1);
+ $backtrace = new lmbBacktrace($this->backtrace_depth['warning']);
$this->_write(lmbLog :: WARNING, $message, $params, $backtrace);
}
@@ -109,7 +120,7 @@
return;
if(!$backtrace)
- $backtrace = new lmbBacktrace(5);
+ $backtrace = new lmbBacktrace($this->backtrace_depth['error']);
$this->_write(lmbLog :: ERROR, $message, $params, $backtrace);
}
@@ -120,9 +131,9 @@
return;
if($e instanceof lmbException)
- $this->error($e->getMessage(), $e->getParams(), new lmbBacktrace($e->getTrace(), 5));
+ $this->error($e->getMessage(), $e->getParams(), new lmbBacktrace($e->getTrace(), $this->backtrace_depth['exception']));
else
- $this->error($e->getMessage(), array(), new lmbBacktrace($e->getTrace(), 5));
+ $this->error($e->getMessage(), array(), new lmbBacktrace($e->getTrace(), $this->backtrace_depth['exception']));
}
function info($message, $params = array(), $backtrace = null)
@@ -131,7 +142,7 @@
return;
if(!$backtrace)
- $backtrace = new lmbBacktrace(3);
+ $backtrace = new lmbBacktrace($this->backtrace_depth['info']);
$this->_write(lmbLog :: INFO, $message, $params, $backtrace);
}
korchasa писал(а):Возможны косяки из-за lmb_env'ов, громко не ругайтесь
pachanga@kurluka ~/dev/local/limb/3.x/limb$ php runtests.php dbal/tests
Using default test database 'mysqli://root:test@localhost/limb_tests?charset=utf8'
Fatal error: Call to undefined function mysqli_query() in /home/pachanga/dev/local/limb/3.x/limb/dbal/src/drivers/mysqli/lmbMysqliConnection.class.php on line 106
pachanga писал(а):Немало всего
Revision #8139
Committed by conf at 24.02.10 15:45:12
-- changed function name lmb_tests_is_db_dump_exists to lmb_tests_db_dump_does_not_exist as more logical (returns true when dump is not found)
-- fixed skip implementation in lmbCacheDbConnectionTest in cache2
Revision #8140
Committed by conf at 24.02.10 17:06:51
-- fixed error in cache locking in mysql(i) driver
-- changed "WHERE" sql clauses to more readable manner
Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 1