44 public function format(array $record)
48 if (isset($record[
'extra'][
'file'])) {
49 $file = $record[
'extra'][
'file'];
50 unset($record[
'extra'][
'file']);
52 if (isset($record[
'extra'][
'line'])) {
53 $line = $record[
'extra'][
'line'];
54 unset($record[
'extra'][
'line']);
58 $message = array(
'message' => $record[
'message']);
60 if ($record[
'context']) {
61 $message[
'context'] = $record[
'context'];
64 if ($record[
'extra']) {
65 $message[
'extra'] = $record[
'extra'];
72 if (isset($record[
'context'][self::TABLE])) {
74 $label = $record[
'channel'] .
': '. $record[
'message'];
77 $type = $this->logLevels[$record[
'level']];
78 $label = $record[
'channel'];
82 $json = $this->
toJson(array(
102 throw new \BadMethodCallException(
'Batch formatting does not make sense for the WildfireFormatter');
107 if (is_object(
$data) && !
$data instanceof \DateTime) {
An exception for terminatinating execution or to throw for unit testing.
const EMERGENCY
Urgent alert.
const ERROR
Runtime errors.
const CRITICAL
Critical conditions.
const WARNING
Exceptional occurrences that are not errors.
const INFO
Interesting events.
const DEBUG
Detailed debug information.
const NOTICE
Uncommon events.
const ALERT
Action must be taken immediately.
catch(Exception $e) $message
normalize($uri)
Takes a URI or partial URI as its argument, and normalizes it.