40 public function format(array $record)
43 $backtrace =
'unknown';
44 if (isset($record[
'extra'][
'file'], $record[
'extra'][
'line'])) {
45 $backtrace = $record[
'extra'][
'file'].
' : '.$record[
'extra'][
'line'];
46 unset($record[
'extra'][
'file'], $record[
'extra'][
'line']);
49 $message = array(
'message' => $record[
'message']);
50 if ($record[
'context']) {
51 $message[
'context'] = $record[
'context'];
53 if ($record[
'extra']) {
54 $message[
'extra'] = $record[
'extra'];
64 $this->logLevels[$record[
'level']],
72 foreach ($records as $record) {
73 $formatted[] = $this->
format($record);
const NOTICE
Uncommon events.
const DEBUG
Detailed debug information.
const ERROR
Runtime errors.
catch(Exception $e) $message
const WARNING
Exceptional occurrences that are not errors.
const EMERGENCY
Urgent alert.
const CRITICAL
Critical conditions.
const ALERT
Action must be taken immediately.
const INFO
Interesting events.