Lines Matching defs:canonical
77 * @param string $canonical - the canonical
79 public static function msg(string $message, int $level = self::LVL_MSG_ERROR, string $canonical = "support", \Exception $e = null)
85 self::log2file($e->getMessage(), LogUtility::LVL_MSG_ERROR, $canonical);
91 self::log2FrontEnd($message, $level, $canonical);
106 self::log2file($message, $level, $canonical, $e);
123 * @param null $canonical
126 static function log2file(?string $msg, int $logLevel = self::LVL_MSG_ERROR, $canonical = null, \Exception $e = null)
139 if (!empty($canonical)) {
140 $prefix .= ' - ' . $canonical;
174 * @param string $canonical
177 public static function log2FrontEnd($message, $level, $canonical = "support", bool $publicMessage = false)
214 if ($canonical !== null) {
215 $label = ucfirst(str_replace(":", " ", $canonical));
216 $htmlMsg = PluginUtility::getDocumentationHyperLink($canonical, $label, false);
337 * @param string $canonical the page
341 public static function error(string $message, string $canonical = self::SUPPORT_CANONICAL, \Exception $e = null)
343 self::msg($message, LogUtility::LVL_MSG_ERROR, $canonical, $e);
346 public static function warning(string $message, string $canonical = "support", \Exception $e = null)
348 self::msg($message, LogUtility::LVL_MSG_WARNING, $canonical, $e);
351 public static function info(string $message, string $canonical = "support", \Exception $e = null)
353 self::msg($message, LogUtility::LVL_MSG_INFO, $canonical, $e);
371 public static function errorIfDevOrTest($message, $canonical = "support")
374 LogUtility::error($message, $canonical);
391 * @param string $canonical
395 public static function internalError(string $message, string $canonical = "support", Throwable $previous = null)
399 throw new ExceptionRuntimeInternal("$internalErrorMessage - $message", $canonical, 1, $previous);
405 self::error("{$internalErrorMessage}: $message.$errorPreviousMessage", $canonical);
411 * @param string $canonical
416 public static function debug(string $message, string $canonical = self::SUPPORT_CANONICAL, $e = null)
418 self::msg($message, LogUtility::LVL_MSG_DEBUG, $canonical, $e);
421 public static function infoToPublic(string $html, string $canonical)
423 self::log2FrontEnd($html, LogUtility::LVL_MSG_INFO, $canonical, true);