controlpanel/controlpanel_plat/inc/cplogger.h
author hgs
Fri, 25 Jun 2010 17:09:30 +0800
changeset 40 6465d5bb863a
parent 34 8844afdb7529
child 52 58cebe0861a8
permissions -rw-r--r--
201025
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32
hgs
parents:
diff changeset
     1
/*
hgs
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
hgs
parents:
diff changeset
     3
* All rights reserved.
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0""
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
hgs
parents:
diff changeset
     8
*
hgs
parents:
diff changeset
     9
* Initial Contributors:
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
hgs
parents:
diff changeset
    11
*
hgs
parents:
diff changeset
    12
* Contributors:
hgs
parents:
diff changeset
    13
*
hgs
parents:
diff changeset
    14
* Description:  
hgs
parents:
diff changeset
    15
*
hgs
parents:
diff changeset
    16
*/
hgs
parents:
diff changeset
    17
#ifndef CPLOGGER_H
hgs
parents:
diff changeset
    18
#define CPLOGGER_H
hgs
parents:
diff changeset
    19
hgs
parents:
diff changeset
    20
hgs
parents:
diff changeset
    21
/* 
40
hgs
parents: 34
diff changeset
    22
    config file path :/logconf/controlpanellog.conf
32
hgs
parents:
diff changeset
    23
hgs
parents:
diff changeset
    24
    Format:
hgs
parents:
diff changeset
    25
34
hgs
parents: 32
diff changeset
    26
    [CpFramework]
32
hgs
parents:
diff changeset
    27
    logdatetime = 1
hgs
parents:
diff changeset
    28
    logloggername = 1
34
hgs
parents: 32
diff changeset
    29
    datetimeformat = hh:mm:ss:zzz
32
hgs
parents:
diff changeset
    30
    output = debugoutput fileoutput
34
hgs
parents: 32
diff changeset
    31
    fileoutput/logfile = C:/data/logs/cpframework.log
hgs
parents: 32
diff changeset
    32
    fileoutput/truncate = 1
hgs
parents: 32
diff changeset
    33
    
hgs
parents: 32
diff changeset
    34
    [CpPerformance]
hgs
parents: 32
diff changeset
    35
    logdatetime = 1
hgs
parents: 32
diff changeset
    36
    datetimeformat = hh:mm:ss:zzz
hgs
parents: 32
diff changeset
    37
    output = fileoutput
hgs
parents: 32
diff changeset
    38
    fileoutput/logfile = C:/data/logs/cpperformance.log
hgs
parents: 32
diff changeset
    39
    fileoutput/truncate = 1
32
hgs
parents:
diff changeset
    40
*/
hgs
parents:
diff changeset
    41
hgs
parents:
diff changeset
    42
#include <QLatin1String>
hgs
parents:
diff changeset
    43
#include <logger.h>
hgs
parents:
diff changeset
    44
40
hgs
parents: 34
diff changeset
    45
/*
hgs
parents: 34
diff changeset
    46
 make CPFW_LOG work
hgs
parents: 34
diff changeset
    47
*/
hgs
parents: 34
diff changeset
    48
hgs
parents: 34
diff changeset
    49
//#define ENABLE_CPFW_LOG
hgs
parents: 34
diff changeset
    50
hgs
parents: 34
diff changeset
    51
/*
hgs
parents: 34
diff changeset
    52
 make CPPERF_LOG work
hgs
parents: 34
diff changeset
    53
*/
hgs
parents: 34
diff changeset
    54
hgs
parents: 34
diff changeset
    55
//#define ENABLE_CPPERF_LOG
hgs
parents: 34
diff changeset
    56
34
hgs
parents: 32
diff changeset
    57
#define CPFW_LOGGER_NAME       QLatin1String("CpFramework")
hgs
parents: 32
diff changeset
    58
#define CPPERF_LOGGER_NAME     QLatin1String("CpPerformance")
32
hgs
parents:
diff changeset
    59
40
hgs
parents: 34
diff changeset
    60
#define CP_LOGGER_CONFIG_PATH QLatin1String(":/logconf/controlpanellog.conf")
hgs
parents: 34
diff changeset
    61
hgs
parents: 34
diff changeset
    62
#ifdef ENABLE_CPFW_LOG
hgs
parents: 34
diff changeset
    63
    #define CPFW_LOG(str)   Logger::instance(CPFW_LOGGER_NAME)->log(str);
hgs
parents: 34
diff changeset
    64
#else
hgs
parents: 34
diff changeset
    65
    #define CPFW_LOG(str)
32
hgs
parents:
diff changeset
    66
#endif
hgs
parents:
diff changeset
    67
40
hgs
parents: 34
diff changeset
    68
#ifdef ENABLE_CPPERF_LOG
hgs
parents: 34
diff changeset
    69
    #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str);
hgs
parents: 34
diff changeset
    70
#else
hgs
parents: 34
diff changeset
    71
    #define CPPERF_LOG(str)
hgs
parents: 34
diff changeset
    72
#endif
32
hgs
parents:
diff changeset
    73
hgs
parents:
diff changeset
    74
#endif /* CPLOGGER_H */