Lines Matching defs:message

73      * Send a message to a manager and log it
75 * @param string $message
79 public static function msg(string $message, int $level = self::LVL_MSG_ERROR, string $canonical = "support", \Exception $e = null)
83 self::messageNotEmpty($message);
91 self::log2FrontEnd($message, $level, $canonical);
106 self::log2file($message, $level, $canonical, $e);
112 self::throwErrorIfTest($level, $message, $e);
150 * because it throws an error message when the environment
172 * @param $message
177 public static function log2FrontEnd($message, $level, $canonical = "support", bool $publicMessage = false)
181 self::messageNotEmpty($message);
183 $message = $e->getMessage();
190 * we test that the message comes in the front end
209 echo "$message\n";
226 * because it throws an error message when the environment
245 $htmlMsg .= " - " . $message;
259 * Log a message to the browser console
260 * @param $message
262 public static function log2BrowserConsole($message)
270 * @param $message
274 private static function throwErrorIfTest($level, $message, \Exception $e = null)
284 throw new LogException($message, $level, $e);
290 * @param string|null $message
293 private static function messageNotEmpty(?string $message)
295 $message = trim($message);
296 if ($message === null || $message === "") {
297 $newMessage = "The passed message to the log was empty or null. BackTrace: \n";
313 public static function wrapInRedForHtml(string $message): string
315 return "<span class=\"text-danger\">$message</span>";
336 * @param string $message the message
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);
390 * @param string $message
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);
410 * @param string $message
416 public static function debug(string $message, string $canonical = self::SUPPORT_CANONICAL, $e = null)
418 self::msg($message, LogUtility::LVL_MSG_DEBUG, $canonical, $e);