sl@0
|
1 |
/**
|
sl@0
|
2 |
* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
*
|
sl@0
|
16 |
*/
|
sl@0
|
17 |
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
/**
|
sl@0
|
21 |
@file RFileLoggermacro.h
|
sl@0
|
22 |
*/
|
sl@0
|
23 |
|
sl@0
|
24 |
#if !(defined __ET_RFILELOGGERMACRO_H__)
|
sl@0
|
25 |
#define __ET_RFILELOGGERMACRO_H__
|
sl@0
|
26 |
|
sl@0
|
27 |
#include <test/rfilelogger.h>
|
sl@0
|
28 |
#ifdef _DEBUG
|
sl@0
|
29 |
#ifndef __FILELOGGER_ACTIVE
|
sl@0
|
30 |
#define __FILELOGGER_ACTIVE
|
sl@0
|
31 |
#endif
|
sl@0
|
32 |
#endif
|
sl@0
|
33 |
|
sl@0
|
34 |
#if defined (__FILELOGGER_ACTIVE ) || defined (SWTRACE_ACTIVE)
|
sl@0
|
35 |
#define __FLOG_DECLARATION_MEMBER RFileFlogger __logger__
|
sl@0
|
36 |
//------------
|
sl@0
|
37 |
#define __FLOG_CONNECT __logger__.Connect()
|
sl@0
|
38 |
|
sl@0
|
39 |
#define __FLOG_CREATE(alogfilepath,amode) __logger__.CreateLog((alogfilepath),(amode))
|
sl@0
|
40 |
|
sl@0
|
41 |
#define __FLOG_CLOSE __logger__.Close()
|
sl@0
|
42 |
|
sl@0
|
43 |
#define __FLOG_SETLOGLEVEL(aloglevel) __logger__.SetLogLevel((aloglevel))
|
sl@0
|
44 |
|
sl@0
|
45 |
|
sl@0
|
46 |
//--------
|
sl@0
|
47 |
#define __FLOG_INFO1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1))
|
sl@0
|
48 |
#define __FLOG_INFO2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2))
|
sl@0
|
49 |
#define __FLOG_INFO3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3))
|
sl@0
|
50 |
#define __FLOG_INFO4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4))
|
sl@0
|
51 |
#define __FLOG_INFO5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
52 |
#define __FLOG_INFO6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
53 |
#define __FLOG_INFO7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
54 |
|
sl@0
|
55 |
#define __FLOG_WARN1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1))
|
sl@0
|
56 |
#define __FLOG_WARN2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2))
|
sl@0
|
57 |
#define __FLOG_WARN3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3))
|
sl@0
|
58 |
#define __FLOG_WARN4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4))
|
sl@0
|
59 |
#define __FLOG_WARN5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
60 |
#define __FLOG_WARN6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
61 |
#define __FLOG_WARN7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
62 |
|
sl@0
|
63 |
#define __FLOG_ERR1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1))
|
sl@0
|
64 |
#define __FLOG_ERR2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2))
|
sl@0
|
65 |
#define __FLOG_ERR3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3)) ;
|
sl@0
|
66 |
#define __FLOG_ERR4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4))
|
sl@0
|
67 |
#define __FLOG_ERR5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
68 |
#define __FLOG_ERR6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
69 |
#define __FLOG_ERR7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
70 |
|
sl@0
|
71 |
// for extra log fields
|
sl@0
|
72 |
#define __FLOG_EXTRA_INFO1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1))
|
sl@0
|
73 |
#define __FLOG_EXTRA_INFO2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2))
|
sl@0
|
74 |
#define __FLOG_EXTRA_INFO3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3))
|
sl@0
|
75 |
#define __FLOG_EXTRA_INFO4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4))
|
sl@0
|
76 |
#define __FLOG_EXTRA_INFO5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
77 |
#define __FLOG_EXTRA_INFO6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
78 |
#define __FLOG_EXTRA_INFO7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
79 |
|
sl@0
|
80 |
#define __FLOG_EXTRA_WARN1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1))
|
sl@0
|
81 |
#define __FLOG_EXTRA_WARN2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2))
|
sl@0
|
82 |
#define __FLOG_EXTRA_WARN3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3))
|
sl@0
|
83 |
#define __FLOG_EXTRA_WARN4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4))
|
sl@0
|
84 |
#define __FLOG_EXTRA_WARN5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
85 |
#define __FLOG_EXTRA_WARN6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
86 |
#define __FLOG_EXTRA_WARN7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
87 |
|
sl@0
|
88 |
#define __FLOG_EXTRA_ERR1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1))
|
sl@0
|
89 |
#define __FLOG_EXTRA_ERR2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2))
|
sl@0
|
90 |
#define __FLOG_EXTRA_ERR3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3)) ;
|
sl@0
|
91 |
#define __FLOG_EXTRA_ERR4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4))
|
sl@0
|
92 |
#define __FLOG_EXTRA_ERR5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5))
|
sl@0
|
93 |
#define __FLOG_EXTRA_ERR6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6))
|
sl@0
|
94 |
#define __FLOG_EXTRA_ERR7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7))
|
sl@0
|
95 |
|
sl@0
|
96 |
#else
|
sl@0
|
97 |
#define __FILELOG_DECLARATION_MEMBER
|
sl@0
|
98 |
//------------
|
sl@0
|
99 |
#define __FLOG_CONNECT
|
sl@0
|
100 |
|
sl@0
|
101 |
#define __FLOG_CREATE(alogfilepath,amode)
|
sl@0
|
102 |
|
sl@0
|
103 |
#define __FLOG_CLOSE
|
sl@0
|
104 |
|
sl@0
|
105 |
//--------
|
sl@0
|
106 |
#define __FLOG_INFO1(p1)
|
sl@0
|
107 |
#define __FLOG_INFO2(p1, p2)
|
sl@0
|
108 |
#define __FLOG_INFO3(p1, p2, p3)
|
sl@0
|
109 |
#define __FLOG_INFO4(p1, p2, p3, p4)
|
sl@0
|
110 |
#define __FLOG_INFO5(p1, p2, p3, p4, p5)
|
sl@0
|
111 |
#define __FLOG_INFO6(p1, p2, p3, p4, p5, p6)
|
sl@0
|
112 |
#define __FLOG_INFO7(p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
113 |
|
sl@0
|
114 |
#define __FLOG_WARN1(p1)
|
sl@0
|
115 |
#define __FLOG_WARN2(p1, p2)
|
sl@0
|
116 |
#define __FLOG_WARN3(p1, p2, p3)
|
sl@0
|
117 |
#define __FLOG_WARN4(p1, p2, p3, p4)
|
sl@0
|
118 |
#define __FLOG_WARN5(p1, p2, p3, p4, p5)
|
sl@0
|
119 |
#define __FLOG_WARN6(p1, p2, p3, p4, p5, p6)
|
sl@0
|
120 |
#define __FLOG_WARN7(p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
121 |
|
sl@0
|
122 |
#define __FLOG_ERR1(p1)
|
sl@0
|
123 |
#define __FLOG_ERR2(p1, p2)
|
sl@0
|
124 |
#define __FLOG_ERR3(p1, p2, p3)
|
sl@0
|
125 |
#define __FLOG_ERR4(p1, p2, p3, p4)
|
sl@0
|
126 |
#define __FLOG_ERR5(p1, p2, p3, p4, p5)
|
sl@0
|
127 |
#define __FLOG_ERR6(p1, p2, p3, p4, p5, p6)
|
sl@0
|
128 |
#define __FLOG_ERR7(p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
129 |
|
sl@0
|
130 |
// for extra log fields
|
sl@0
|
131 |
#define __FLOG_EXTRA_INFO1(length, extra, p1)
|
sl@0
|
132 |
#define __FLOG_EXTRA_INFO2(length, extra, p1, p2)
|
sl@0
|
133 |
#define __FLOG_EXTRA_INFO3(length, extra, p1, p2, p3)
|
sl@0
|
134 |
#define __FLOG_EXTRA_INFO4(length, extra, p1, p2, p3, p4)
|
sl@0
|
135 |
#define __FLOG_EXTRA_INFO5(length, extra, p1, p2, p3, p4, p5)
|
sl@0
|
136 |
#define __FLOG_EXTRA_INFO6(length, extra, p1, p2, p3, p4, p5, p6)
|
sl@0
|
137 |
#define __FLOG_EXTRA_INFO7(length, extra, p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
138 |
|
sl@0
|
139 |
#define __FLOG_EXTRA_WARN1(length, extra, p1)
|
sl@0
|
140 |
#define __FLOG_EXTRA_WARN2(length, extra, p1, p2)
|
sl@0
|
141 |
#define __FLOG_EXTRA_WARN3(length, extra, p1, p2, p3)
|
sl@0
|
142 |
#define __FLOG_EXTRA_WARN4(length, extra, p1, p2, p3, p4)
|
sl@0
|
143 |
#define __FLOG_EXTRA_WARN5(length, extra, p1, p2, p3, p4, p5)
|
sl@0
|
144 |
#define __FLOG_EXTRA_WARN6(length, extra, p1, p2, p3, p4, p5, p6)
|
sl@0
|
145 |
#define __FLOG_EXTRA_WARN7(length, extra, p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
146 |
|
sl@0
|
147 |
#define __FLOG_EXTRA_ERR1(length, extra, p1)
|
sl@0
|
148 |
#define __FLOG_EXTRA_ERR2(length, extra, p1, p2)
|
sl@0
|
149 |
#define __FLOG_EXTRA_ERR3(length, extra, p1, p2, p3)
|
sl@0
|
150 |
#define __FLOG_EXTRA_ERR4(length, extra, p1, p2, p3, p4)
|
sl@0
|
151 |
#define __FLOG_EXTRA_ERR5(length, extra, p1, p2, p3, p4, p5)
|
sl@0
|
152 |
#define __FLOG_EXTRA_ERR6(length, extra, p1, p2, p3, p4, p5, p6)
|
sl@0
|
153 |
#define __FLOG_EXTRA_ERR7(length, extra, p1, p2, p3, p4, p5, p6, p7)
|
sl@0
|
154 |
|
sl@0
|
155 |
#endif
|
sl@0
|
156 |
#endif
|