* @param boolean $printout
* @param string $runlevel
*/
- public function __construct($printout = false, $runlevel = self::LEVEL_INFO)
- {
+ public function __construct($printout = false, $runlevel = self::LEVEL_INFO) {
$this->printout = (boolean) $printout;
$this->runlevel = (int) $runlevel;
}
* @param string $msg
* @param integer $runlevel
*/
- public function log($msg, $runlevel = self::LEVEL_INFO)
- {
+ public function log($msg, $runlevel = self::LEVEL_INFO) {
$time = time();
#$this->data[] = array($this->runlevel, $msg, $time);
if ($this->printout and $runlevel <= $this->runlevel) {
* @param boolean $clear
* @param integer $runlevel
*/
- public function printout($clear = true, $runlevel = null)
- {
+ public function printout($clear = true, $runlevel = null) {
if ($runlevel === null) {
$runlevel = $this->runlevel;
}
}
}
- protected function writeLine($msg, $runlevel, $time)
- {
+ protected function writeLine($msg, $runlevel, $time) {
//echo date('Y-m-d H:i:s', $time)." [".$this->names[$runlevel]."]: ".$msg."\n";
echo $time . " [" . $this->names[$runlevel] . "]: " . $msg . "\n";
flush();