controlpanel/controlpanel_plat/inc/cplogger.h
changeset 40 6465d5bb863a
parent 34 8844afdb7529
child 52 58cebe0861a8
equal deleted inserted replaced
39:c044bc2ea8f7 40:6465d5bb863a
    17 #ifndef CPLOGGER_H
    17 #ifndef CPLOGGER_H
    18 #define CPLOGGER_H
    18 #define CPLOGGER_H
    19 
    19 
    20 
    20 
    21 /* 
    21 /* 
    22     Windows: C:/ControlPanel/debug/bin/controlpanellog.conf
    22     config file path :/logconf/controlpanellog.conf
    23     Symbian: C:/data/.config/controlpanellog.conf
       
    24 
    23 
    25     Format:
    24     Format:
    26 
    25 
    27     [CpFramework]
    26     [CpFramework]
    28     logdatetime = 1
    27     logdatetime = 1
    41 */
    40 */
    42 
    41 
    43 #include <QLatin1String>
    42 #include <QLatin1String>
    44 #include <logger.h>
    43 #include <logger.h>
    45 
    44 
       
    45 /*
       
    46  make CPFW_LOG work
       
    47 */
       
    48 
       
    49 //#define ENABLE_CPFW_LOG
       
    50 
       
    51 /*
       
    52  make CPPERF_LOG work
       
    53 */
       
    54 
       
    55 //#define ENABLE_CPPERF_LOG
       
    56 
    46 #define CPFW_LOGGER_NAME       QLatin1String("CpFramework")
    57 #define CPFW_LOGGER_NAME       QLatin1String("CpFramework")
    47 #define CPPERF_LOGGER_NAME     QLatin1String("CpPerformance")
    58 #define CPPERF_LOGGER_NAME     QLatin1String("CpPerformance")
    48 
    59 
    49 #if defined (Q_OS_SYMBIAN)
    60 #define CP_LOGGER_CONFIG_PATH QLatin1String(":/logconf/controlpanellog.conf")
    50     #define CP_LOGGER_CONFIG_PATH QLatin1String("C:/data/.config/controlpanellog.conf")
    61 
    51 #elif defined (Q_WS_WIN)
    62 #ifdef ENABLE_CPFW_LOG
    52     #ifdef _DEBUG
    63     #define CPFW_LOG(str)   Logger::instance(CPFW_LOGGER_NAME)->log(str);
    53         #define CP_LOGGER_CONFIG_PATH QLatin1String("C:/controlpanel/debug/bin/controlpanellog.conf")
    64 #else
    54     #else 
    65     #define CPFW_LOG(str)
    55         #define CP_LOGGER_CONFIG_PATH QLatin1String("C:/controlpanel/release/bin/controlpanellog.conf")
       
    56     #endif
       
    57 #endif
    66 #endif
    58 
    67 
    59 #define CPFW_LOG(str)   Logger::instance(CPFW_LOGGER_NAME)->log(str);
    68 #ifdef ENABLE_CPPERF_LOG
    60 #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str);
    69     #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str);
       
    70 #else
       
    71     #define CPPERF_LOG(str)
       
    72 #endif
    61 
    73 
    62 #endif /* CPLOGGER_H */
    74 #endif /* CPLOGGER_H */