public function __construct($filename = "loops.log", $mode = "a+", $level = "notice", Loops $loops = NULL) { parent::__construct($level, $loops); $application = $this->getLoops()->getService("application"); $filename = Misc::fullPath($filename, $application->cache_dir); $this->fo = new SplFileObject($filename, $mode); }
public function __construct($level = "info", $color = NULL, Loops $loops = NULL) { parent::__construct($level, $loops); //@todo Find out if there is a way to check if the terminal supports colors and adjust logic. $this->color = $color === NULL ? php_sapi_name() == "cli" : (bool) $color; }