protected function sysLog($msg, $level)
    {
        switch ($level) {
            case self::EMERG:
                $priority = LOG_EMERG;
                break;
            case self::ERROR:
                $priority = LOG_ERR;
                break;
            case self::WARN:
                $priority = LOG_WARNING;
                break;
            case self::DEBUG:
                $priority = LOG_DEBUG;
                break;
            case self::INFO:
            case self::PROC_INFO:
            case self::WORKER_INFO:
            default:
                $priority = LOG_INFO;
                break;
        }

        if (!$ret = syslog($priority, $msg)) {
            $this->stderr("Unable to write to syslog\n");
        }

        return $ret;
    }