private function doWrite($level, $message) {
            $this->lastMessage = $message;
            $this->fopen();

            if ($this->fp && is_resource($this->fp)) {
                $message = $this->buildMessage($level, $message);
                $this->lastMessageFull = $message;
                $ok = $this->config->lock ? [flock($this->fp, LOCK_EX),
                                             fwrite($this->fp, $message),
                                             flock($this->fp, LOCK_UN)] : [fwrite($this->fp, $message)];

                return !in_array(false, $ok, true);
            }

            // @codeCoverageIgnoreStart
            return false;
            // @codeCoverageIgnoreEnd
        }