public function setLogger($log = self::SYSLOG)
    {
        if ($log === self::FILES || $log === self::FILES_DEBUG) {
            $log_file = strtr(static::DEFAULT_LOG_FILE, [
                '{name}' => $this->name,
            ]);
            $this->logger = new Loggers\FilesLogger($log_file);
        } else if ($log === self::TERMINAL) {
            $this->logger = new Loggers\TerminalLogger();
        } else
            $this->logger = new Loggers\SyslogLogger();
        return $this;
    }
public function setLogger($log = self::SYSLOG)
    {
        if ($log === self::FILES || $log === self::FILES_DEBUG) {
            $log_file = strtr(static::DEFAULT_LOG_FILE, [
                '{name}' => $this->name,
            ]);
            $this->logger = new Loggers\FilesLogger($log_file);
        } else if ($log === self::TERMINAL) {
            $this->logger = new Loggers\TerminalLogger();
        } else
            $this->logger = new Loggers\SyslogLogger();
        return $this;
    }
public function setLogger ( $ log = self :: SYSLOG ) { if ( $ log === self :: FILES || $ log === self :: FILES_DEBUG ) { $ log_file = strtr ( static :: DEFAULT_LOG_FILE , [ '{name}' => $ this -> name , ] ) ; $ this -> logger = new Loggers \ FilesLogger ( $ log_file ) ; } else if ( $ log === self :: TERMINAL ) { $ this -> logger = new Loggers \ TerminalLogger ( ) ; } else $ this -> logger = new Loggers \ SyslogLogger ( ) ; return $ this ; }
Sets logger for daemon.
@param integer $log
Sets logger for daemon .