/** * Log information useful to developers for debugging the application; not useful * during normal operation. * * @param string $msg Message string to log * @param null|object $data Serializable data object relevant to the event, if any * @param null|\Exception $ex Exception object relevant to the event, if any */ public static function debug($msg, $data = null, $ex = null) { Logger::$context->addEventToContext(new LogEvent(LOG_DEBUG, $msg, null, $data, $ex)); }
/** * Notification callback that the log context has changed its name * * @param string[] $contextNames Stack of context names. $contextName[0] is * the new name of the current context * @param string $oldTopName The old name of the current context */ public function renameContext($contextNames, $oldTopName) { $this->contextName = LogContextHandler::createQualifiedContextName($contextNames); }
/** * Notification callback that the logging infrastructure is shutting down */ public function shutdown() { if ($this->errorSeen) { $this->sendMail(LOG_ERR, $this->context->getContextEntries(0)); } }