mirror of
https://github.com/Piwigo/Piwigo.git
synced 2025-04-26 03:09:58 +03:00
fixes #2336 more details in Logger (execution_uuid)
This commit is contained in:
parent
daef1ed375
commit
789c062837
3 changed files with 9 additions and 2 deletions
|
@ -2228,7 +2228,9 @@ function pwg_URL()
|
|||
*/
|
||||
function invalidate_user_cache($full = true)
|
||||
{
|
||||
global $persistent_cache;
|
||||
global $persistent_cache, $logger;
|
||||
|
||||
$logger->info(__FUNCTION__.' starts');
|
||||
|
||||
if ($full)
|
||||
{
|
||||
|
@ -2249,6 +2251,7 @@ UPDATE '.USER_CACHE_TABLE.'
|
|||
$persistent_cache->purge(true);
|
||||
conf_delete_param('count_orphans');
|
||||
trigger_notify('invalidate_user_cache', $full);
|
||||
$logger->info(__FUNCTION__.' ends');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -340,11 +340,13 @@ class Logger
|
|||
*/
|
||||
private function formatMessage($level, $message, $cat, $context)
|
||||
{
|
||||
global $page;
|
||||
|
||||
if (!empty($context))
|
||||
{
|
||||
$message.= "\n" . $this->indent($this->contextToString($context));
|
||||
}
|
||||
$line = "[" . $this->getTimestamp() . "]\t[" . self::levelToCode($level) . "]\t";
|
||||
$line = "[" . $this->getTimestamp() . '][exec='.($page['execution_uuid']??'unkonwn')."]\t[" . self::levelToCode($level) . "]\t";
|
||||
if ($cat != null)
|
||||
{
|
||||
$line.= "[" . $cat . "]\t";
|
||||
|
|
|
@ -109,6 +109,8 @@ include(PHPWG_ROOT_PATH . 'include/template.class.php');
|
|||
include(PHPWG_ROOT_PATH . 'include/cache.class.php');
|
||||
include(PHPWG_ROOT_PATH . 'include/Logger.class.php');
|
||||
|
||||
$page['execution_uuid'] = generate_key(10);
|
||||
|
||||
$persistent_cache = new PersistentFileCache();
|
||||
|
||||
// Database connection
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue