mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Enable logging in FrontEndFileHandler
This commit is contained in:
parent
f019236976
commit
df1c365872
1 changed files with 30 additions and 0 deletions
|
|
@ -53,6 +53,12 @@ class FrontEndFileHandler extends Handler
|
|||
*/
|
||||
public $jsBodyMapIndex = array();
|
||||
|
||||
/**
|
||||
* Logging
|
||||
*/
|
||||
protected $_log_enabled = false;
|
||||
protected $_log_entries = [];
|
||||
|
||||
/**
|
||||
* Check SSL
|
||||
*
|
||||
|
|
@ -92,6 +98,10 @@ class FrontEndFileHandler extends Handler
|
|||
{
|
||||
$args = array($args);
|
||||
}
|
||||
if ($this->_log_enabled)
|
||||
{
|
||||
$this->_log_entries[] = $args;
|
||||
}
|
||||
|
||||
// Replace obsolete paths with current paths.
|
||||
$args[0] = preg_replace(array_keys(HTMLDisplayHandler::$replacements), array_values(HTMLDisplayHandler::$replacements), $args[0]);
|
||||
|
|
@ -252,6 +262,26 @@ class FrontEndFileHandler extends Handler
|
|||
return $file;
|
||||
}
|
||||
|
||||
/**
|
||||
* Start logging.
|
||||
*/
|
||||
public function startLog()
|
||||
{
|
||||
$this->_log_enabled = true;
|
||||
$this->_log_entries = [];
|
||||
}
|
||||
|
||||
/**
|
||||
* End logging and return the log entries.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function endLog(): array
|
||||
{
|
||||
$this->_log_enabled = false;
|
||||
return $this->_log_entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process CSS and JS file
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue