void TickCursorImpl::log_select()

in src/dxapi/native/tickdb/http/tickcursor_http.cpp [1051:1094]


void TickCursorImpl::log_select(const string &xml, int what, bool isError)
{
#if (DBG_LOG_ENABLED == 1) && (XML_LOG_LEVEL > 0)
#if !defined(_DEBUG)
    if (!isError) {
        return;
    }
    
#endif

    SubscriptionState &s = *mainState_;
    const char * str = xml.c_str();

#if XML_LOG_LEVEL < 2 || VERBOSE_CURSOR < 1
    if (!isError)
        return;
#endif


    switch ((enum LogItem)what) {
    case LOG_REQUEST:
        if (s.nStreams() > 0) {
            dbg_log_xml(this->textId().append(" - select ").c_str(), str);
        }
        else if (options.qql.is_set()) {
            dbg_log_xml(this->textId().append(" - selectQQL " + options.qql.get()).c_str(), str);
        }
        else {
            dbg_log_xml(this->textId().append(" - select without streams&qql").c_str(), str);
        }

        break;

    case LOG_RESP_HEADER:
        dbg_log_xml(this->textId().append(" - response header").c_str(), str);
        break;

    case LOG_RESP_BODY:
        dbg_log_xml(this->textId().append(!isError ? " - response " : " - response (error)").c_str(), str);
        break;
    }

#endif // #if (DBG_LOG_ENABLED == 1) && (XML_LOG_LEVEL > 0)
}