Qtopia Home · Index · Classes · Headers · Overviews

<qtopiadesktoplog.h> - <qtopiadesktoplog.h>

The <qtopiadesktoplog.h> header contains the category definitions used in Qtopia Sync Agent. More...

Functions

Macros

The <qtopiadesktoplog.h> header contains the category definitions used in Qtopia Sync Agent.

    //QLOG_UNCATEGORIZED()     // uncategorized logging
    QD_LOG_OPTION(QDA)       // This is reserved for QtopiaDesktopApplication
    QD_LOG_OPTION(PM)        // Plugin Manager logging
    QD_LOG_OPTION(I18N)      // I18n-related stuff
    QD_LOG_OPTION(UI)        // General UI-related stuff
    QD_LOG_OPTION(UI_tray)   // System Tray

    // "Generic" plugin LOG (by class)
    QD_LOG_OPTION(QDApp)
    QD_LOG_OPTION(QDLink)
    QD_LOG_OPTION(QDCon)
    QD_LOG_OPTION(QDDev)
    QD_LOG_OPTION(QDSync)

See also <qlog.h>.


Function Documentation

bool qtopiadesktopLogEnabled ( const char * category )

This function returns true if category has been enabled.

        DesktopSettings settings( "Log" );
        QVariant v = settings.value( category );
        if ( v.isNull() ) {
            v = DesktopSettings::debugMode()?1:0;
            if ( category == "TRACE" )
                v = 0;
            settings.setValue( category, v );
        }
        bool ret = v.toBool();
        (*cache)[QString(category)] = ret;
        //qDebug() << "category" << category << ret;
        return ret;

Macro Documentation

QDLOG_OPTION ( CATEGORY )

Register a category for conditional logging. This enables qLog(CATEGORY) but the log messages are not displayed unless CATEGORY is enabled. This macro uses the qtopiadesktopLogEnabled() function to check if CATEGORY is enabled.


Copyright © 2008 Nokia Qtopia Sync Agent Documentation