Esempio n. 1
0
 public function setLog($arg, $func, $name = null)
 {
     if (!is_null($name)) {
         // if is defined
         $name1 = Helper::getClassName($name);
     } else {
         $name1 = 'error';
     }
     $logger = new Logger($func);
     $logger->pushHandler(new StreamHandler($this->path . "/{$name1}.log", Logger::DEBUG));
     return $logger->addInfo(json_encode($arg));
 }