|
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 |
|
18 #ifndef SUT_LOG_DEF__ |
|
19 #define SUT_LOG_DEF__ |
|
20 |
|
21 #include <SUTFlags.cfg> |
|
22 |
|
23 #ifdef __ENABLE_LOGGING__ |
|
24 |
|
25 #include <flogger.h> |
|
26 _LIT(KLogFolder, "sut"); |
|
27 _LIT(KLogFile, "sut_log.txt"); |
|
28 |
|
29 #define SUT_LOG_START(a1) {RFileLogger::Write(KLogFolder, KLogFile, EFileLoggingModeOverwrite, a1);} |
|
30 #define SUT_LOG_INFO(a1) {RFileLogger::Write(KLogFolder, KLogFile, EFileLoggingModeAppend, a1);} |
|
31 #define SUT_LOG_FORMAT(a1, a2) {RFileLogger::WriteFormat(KLogFolder, KLogFile, EFileLoggingModeAppend, a1, (a2));} |
|
32 #define SUT_LOG_FORMAT2(a1, a2, a3) {RFileLogger::WriteFormat(KLogFolder, KLogFile, EFileLoggingModeAppend, a1, (a2), (a3));} |
|
33 #define SUT_LOG_FORMAT3(a1, a2, a3, a4) {RFileLogger::WriteFormat(KLogFolder, KLogFile, EFileLoggingModeAppend, a1, (a2), (a3), (a4));} |
|
34 |
|
35 |
|
36 #ifdef __ENABLE_LOGGING_DEBUG__ |
|
37 #define SUT_LOG_DEBUG(a1) {_LIT(temp, a1); RFileLogger::Write(KLogFolder, KLogFile, EFileLoggingModeAppend, temp);} |
|
38 #define SUT_LOG_DEBUGF(a1, a2) {RFileLogger::WriteFormat(KLogFolder, KLogFile, EFileLoggingModeAppend, a1, (a2));} |
|
39 #else |
|
40 #define SUT_LOG_DEBUG(a1) |
|
41 #define SUT_LOG_DEBUGF(a1, a2) |
|
42 #endif // __ENABLE_LOGGING_DEBUG__ |
|
43 |
|
44 #else |
|
45 // NO LOGGING |
|
46 |
|
47 #define SUT_LOG_START(a1) |
|
48 #define SUT_LOG_INFO(a1) |
|
49 #define SUT_LOG_FORMAT(a1, a2) |
|
50 #define SUT_LOG_FORMAT2(a1, a2, a3) |
|
51 #define SUT_LOG_FORMAT3(a1, a2, a3, a4) |
|
52 #define SUT_LOG_DEBUG(a1) |
|
53 #define SUT_LOG_DEBUGF(a1, a2) |
|
54 |
|
55 #endif // __ENABLE_LOGGING__ |
|
56 |
|
57 #endif // SUT_LOG_DEF__ |