* Prune save log in upgrade and add real-time save sql.

This commit is contained in:
wangyidong
2023-11-25 14:57:22 +08:00
parent 3608679b9d
commit c59d02e73b
2 changed files with 39 additions and 278 deletions
+16
View File
@@ -163,6 +163,16 @@ class baseDAO
*/
static public $cache = array();
/**
* 实时记录日志设置,并设置记录文件。
* Open real time log and set real time file.
*
* @var array
* @access public
*/
static public $realTimeLog = false;
static public $realTimeFile = '';
/**
* 构造方法。
* The construct method.
@@ -756,6 +766,9 @@ class baseDAO
try
{
/* Real-time save log. */
if($this->realTimeLog && $this->realTimeFile) file_put_contents($this->realTimeFile, $sql, FILE_APPEND);
$method = $this->method;
$this->reset();
@@ -859,6 +872,9 @@ class baseDAO
try
{
/* Real-time save log. */
if($this->realTimeLog && $this->realTimeFile) file_put_contents($this->realTimeFile, $sql, FILE_APPEND);
if($this->table) unset(dao::$cache[$this->table]);
$this->reset();
+23 -278
View File
File diff suppressed because it is too large Load Diff