equal
deleted
inserted
replaced
39 #define FU_DEBUG RDebug::Print |
39 #define FU_DEBUG RDebug::Print |
40 #else |
40 #else |
41 #ifdef _MPX_FILE_LOGGING_ |
41 #ifdef _MPX_FILE_LOGGING_ |
42 #define FU_DEBUG MPXDebug::FileLog |
42 #define FU_DEBUG MPXDebug::FileLog |
43 #else |
43 #else |
44 #define FU_DEBUG MPXDebug::NullLog |
44 #define FU_DEBUG |
45 #endif |
45 #endif |
46 #endif |
46 #endif |
47 |
47 |
48 |
48 |
49 class MPXDebug |
49 class MPXDebug |
50 { |
50 { |
51 public: |
51 public: |
52 inline static void NullLog( TRefByValue<const TDesC16> /*aFmt*/, ... ) |
|
53 { |
|
54 } |
|
55 |
|
56 inline static void NullLog( TRefByValue<const TDesC> /*aFunctionName*/, |
|
57 TRefByValue<const TDesC16> /*aFmt*/, ... ) |
|
58 { |
|
59 } |
|
60 |
|
61 inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... ) |
52 inline static void FileLog( TRefByValue<const TDesC16> aFmt, ... ) |
62 { |
53 { |
63 VA_LIST list; |
54 VA_LIST list; |
64 VA_START(list,aFmt); |
55 VA_START(list,aFmt); |
65 RFileLogger::WriteFormat( _L("Fusion"), |
56 RFileLogger::WriteFormat( _L("Fusion"), |
75 // MACROS |
66 // MACROS |
76 #ifdef _DEBUG |
67 #ifdef _DEBUG |
77 #define MPX_DEBUG TFusionLog::FusionLog |
68 #define MPX_DEBUG TFusionLog::FusionLog |
78 #define MPX_ENTER_EXIT TEnterExitLog _s |
69 #define MPX_ENTER_EXIT TEnterExitLog _s |
79 #else |
70 #else |
80 #define MPX_DEBUG MPXDebug::NullLog |
71 #define MPX_DEBUG |
81 #define MPX_ENTER_EXIT MPXDebug::NullLog |
72 #define MPX_ENTER_EXIT |
82 #endif |
73 #endif |
83 |
74 |
84 |
75 |
85 class TFusionLog : public TDes16Overflow |
76 class TFusionLog : public TDes16Overflow |
86 { |
77 { |
158 {\ |
149 {\ |
159 if (aErr) \ |
150 if (aErr) \ |
160 FU_DEBUG(_KMPXErrorInfo, aErr, MPX_S(__FILE__), __LINE__);\ |
151 FU_DEBUG(_KMPXErrorInfo, aErr, MPX_S(__FILE__), __LINE__);\ |
161 } |
152 } |
162 |
153 |
163 #define MPX_TRAP(_r, _s) TRAP(_r,_s);MPX_ERROR_LOG(_r); |
154 #ifdef _DEBUG |
164 #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);MPX_ERROR_LOG(_r); |
155 #define MPX_TRAP(_r, _s) TRAP(_r,_s);MPX_ERROR_LOG(_r); |
|
156 #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);MPX_ERROR_LOG(_r); |
|
157 #else // _DEBUG |
|
158 #define MPX_TRAP(_r, _s) TRAP(_r,_s);(_r=_r); |
|
159 #define MPX_TRAPD(_r, _s) TRAPD(_r,_s);(_r=_r); |
|
160 #endif // _DEBUG |
165 |
161 |
166 #endif // __MPXVIDEO_DEBUG_H__ |
162 #endif // __MPXVIDEO_DEBUG_H__ |
167 |
163 |
168 // End of File |
164 // End of File |