1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #ifndef CPLOGGER_H |
|
18 #define CPLOGGER_H |
|
19 |
|
20 |
|
21 /* |
|
22 config file path :/logconf/controlpanellog.conf |
|
23 |
|
24 Format: |
|
25 |
|
26 [CpFramework] |
|
27 logdatetime = 1 |
|
28 logloggername = 1 |
|
29 datetimeformat = hh:mm:ss:zzz |
|
30 output = debugoutput fileoutput |
|
31 fileoutput/logfile = C:/data/logs/cpframework.log |
|
32 fileoutput/truncate = 1 |
|
33 |
|
34 [CpPerformance] |
|
35 logdatetime = 1 |
|
36 datetimeformat = hh:mm:ss:zzz |
|
37 output = fileoutput |
|
38 fileoutput/logfile = C:/data/logs/cpperformance.log |
|
39 fileoutput/truncate = 1 |
|
40 */ |
|
41 |
|
42 #include <QLatin1String> |
|
43 #include <logger.h> |
|
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 |
|
57 #define CPFW_LOGGER_NAME QLatin1String("CpFramework") |
|
58 #define CPPERF_LOGGER_NAME QLatin1String("CpPerformance") |
|
59 |
|
60 #define CP_LOGGER_CONFIG_PATH QLatin1String(":/logconf/controlpanellog.conf") |
|
61 |
|
62 #ifdef ENABLE_CPFW_LOG |
|
63 #define CPFW_LOG(str) Logger::instance(CPFW_LOGGER_NAME)->log(str); |
|
64 #else |
|
65 #define CPFW_LOG(str) |
|
66 #endif |
|
67 |
|
68 #ifdef ENABLE_CPPERF_LOG |
|
69 #define CPPERF_LOG(str) Logger::instance(CPPERF_LOGGER_NAME)->log(str); |
|
70 #else |
|
71 #define CPPERF_LOG(str) |
|
72 #endif |
|
73 |
|
74 #endif /* CPLOGGER_H */ |
|