public function on ($method, $statement, $execution_wall_time = null, array $parameters = []) {
        if ($method === 'prepare' || !$this->getAttribute(\Gajus\Doll\PDO::ATTR_LOGGING)) {
            return;
        }

        $statement = trim(preg_replace('/\s+/', ' ', str_replace("\n", ' ', $statement)));
        $backtrace = debug_backtrace(\DEBUG_BACKTRACE_IGNORE_ARGS, 2)[1];

        $this->log[] = [
            'statement' => $statement,
            'parameters' => $parameters,
            'execution_wall_time' => $execution_wall_time,
            'backtrace' => $backtrace
        ];

        if (count($this->log) % 100 === 0) {
            $this->applyProfileData();
        }
    }