protected function setConfigQueryLogState()
    {
        // Check if state is set
        if( ! is_null($this->config->queryLogState))
            return;

        // Set check query log state
        if($this->config->isQueryLog())
        {
            $this->config->queryLogState = false;

            // Check if DB class exists
            if( ! class_exists('\Illuminate\Support\Facades\DB'))
                return;

            // Resister listener
            try
            {
                \Illuminate\Support\Facades\DB::listen(function ($sql) {$this->queryLogStack[] = new QueryLogHolder($sql);});
                $this->config->queryLogState = true;
            }
            catch (\RuntimeException $e)
            {
                try
                {
                    \Illuminate\Database\Capsule\Manager::listen(function ($sql) {$this->queryLogStack[] = new QueryLogHolder($sql);});
                    $this->config->queryLogState = true;

                }
                catch (\RuntimeException $e)
                {
                    $this->config->queryLogState = false;
                }
            }
        }
    }