src/Base.php
protected static function writeErrorMessage($exception, string $tag = 'mysql')
    {
        $log = Log::getLogger($tag);
        $errLevel = $exception ->getCode() ? array_search($exception ->getCode(), Log::$levels) : 'warning';
        $log->$errLevel($exception->errorMessage());
        if (CONFIG['server']['swoole']['daemonize'] != true) {
            echo  '[' . ucfirst($errLevel) . '] ', $exception->errorMessage(), PHP_EOL;
        }
    }
protected static function writeErrorMessage($exception, string $tag = 'mysql')
    {
        $log = Log::getLogger($tag);
        $errLevel = $exception ->getCode() ? array_search($exception ->getCode(), Log::$levels) : 'warning';
        $log->$errLevel($exception->errorMessage());
        if (CONFIG['server']['swoole']['daemonize'] != true) {
            echo  '[' . ucfirst($errLevel) . '] ', $exception->errorMessage(), PHP_EOL;
        }
    }
写入日志

@param $exception
@param string $tag