FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Console.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Console extends \Rsi\Fred\Log\Handler{
6 
7  public $date = null;
8 
9  public function add($prio,$message,$context){
10  if(($date = date('Y-m-d')) != $this->date){
11  print("------------------------- $date -------------------------\n");
12  $this->date = $date;
13  }
14  print(date('H:i:s') . " [$prio] $message\n");
15  if(($prio >= \Rsi\Fred\Log::ERROR) && ($filename = $context['filename'] ?? null))
16  print(" $filename" . (($line_no = $context['lineNo'] ?? null) ? ":$line_no" : '') . "\n");
17  }
18 
19 }
const ERROR
Error conditions.
Definition: Log.php:11
Framework for Rapid and Easy Development.
Definition: Fred.php:18
add($prio, $message, $context)
Definition: Console.php:9