diff --git a/admin/include/functions.php b/admin/include/functions.php index dee2a9a69..0c7813e97 100644 --- a/admin/include/functions.php +++ b/admin/include/functions.php @@ -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'); } /** diff --git a/include/Logger.class.php b/include/Logger.class.php index 4c3785d2a..e2afa80ff 100644 --- a/include/Logger.class.php +++ b/include/Logger.class.php @@ -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"; diff --git a/include/common.inc.php b/include/common.inc.php index da23934ef..e40129c9f 100644 --- a/include/common.inc.php +++ b/include/common.inc.php @@ -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