|
1 /* |
|
2 * Copyright (c) 2007 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: logger declarations |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __GBALOGGER_H_ |
|
19 #define __GBALOGGER_H_ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 _LIT( KGBALogDir, "GBA" ); |
|
24 _LIT( KGBALogFileName, "GBALog.txt" ); |
|
25 _LIT( KEnter, "Enter ---->"); |
|
26 _LIT( KEnd, "Exit <----"); |
|
27 |
|
28 #ifdef _DEBUG |
|
29 |
|
30 void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC &arg4); |
|
31 void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC8 &arg4); |
|
32 void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4, const TInt &aNum); |
|
33 void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const TDesC8 &arg4, const TInt &aNum); |
|
34 void DebugBinary(const TDesC8 &buf); |
|
35 void debugTTimeL( TTime& aTime ); |
|
36 void debuglineL(const char *a, void *arg1, void* f, void *arg2, void *arg3, const char *arg4); |
|
37 |
|
38 #define GBA_DEBUG |
|
39 #define GBA_TRACE_DEBUG_DESC(a) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a)) |
|
40 #define GBA_TRACE_DEBUG_NUM( a,b ) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a),b) |
|
41 |
|
42 #ifdef LOG_GBA_KEYS |
|
43 #define GBA_TRACE_DEBUG_BINARY(a) DebugBinary((a)); |
|
44 #else |
|
45 #define GBA_TRACE_DEBUG_BINARY(a) |
|
46 #endif |
|
47 |
|
48 #define GBA_TRACE_BEGIN() debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnter)) |
|
49 #define GBA_TRACE_END() debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(KEnd)) |
|
50 #define GBA_TRACE_TIME( a ) debugTTimeL( (a) ); |
|
51 #define GBA_TRACE_DEBUG(a) debuglineL("%s:%s %d: %d",(void *) __FILE__, (void *) __func__, (void *)__LINE__, (void *)User::TickCount(),(a)) |
|
52 |
|
53 #else |
|
54 |
|
55 #define GBA_TRACE_DEBUG_DESC(a) |
|
56 #define GBA_TRACE_DEBUG(a) |
|
57 #define GBA_TRACE_DEBUG_NUM(a,b) |
|
58 #define GBA_TRACE_DEBUG_BINARY(a) |
|
59 #define GBA_TRACE_BEGIN() |
|
60 #define GBA_TRACE_END() |
|
61 #define GBA_TRACE_TIME( a ) |
|
62 |
|
63 #endif |
|
64 |
|
65 |
|
66 #endif //__GBALOGGER_H_ |
|
67 |
|
68 //EOF |
|
69 |
|
70 |