1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #include "msdebug.h" |
|
24 |
|
25 #ifdef MSFN_TRACE_ENABLED |
|
26 |
|
27 _LIT8(KFnMsgSIn, ">>\t%S\r\n"); |
|
28 _LIT8(KFnMsgSOut,"<<\t%S\r\n"); |
|
29 _LIT8(KFnMsgIn, ">>[0x%08x]\t%S\r\n"); |
|
30 _LIT8(KFnMsgOut,"<<[0x%08x]\t%S\r\n"); |
|
31 |
|
32 TMsLogStaticFn::TMsLogStaticFn(const TDesC8& aFunctionName) |
|
33 { |
|
34 iFunctionName.Set(aFunctionName); |
|
35 buf.AppendFormat(KFnMsgSIn, &iFunctionName); |
|
36 RDebug::RawPrint(buf); |
|
37 }; |
|
38 |
|
39 |
|
40 TMsLogStaticFn::~TMsLogStaticFn() |
|
41 { |
|
42 buf.Zero(); |
|
43 buf.AppendFormat(KFnMsgSOut, &iFunctionName); |
|
44 RDebug::RawPrint(buf); |
|
45 }; |
|
46 |
|
47 |
|
48 TMsLogFn::TMsLogFn(const TDesC8& aFunctionName, void* aThisPointer) |
|
49 : iThisPointer(aThisPointer) |
|
50 { |
|
51 iFunctionName.Set(aFunctionName); |
|
52 buf.AppendFormat(KFnMsgIn, iThisPointer, &iFunctionName); |
|
53 RDebug::RawPrint(buf); |
|
54 }; |
|
55 |
|
56 |
|
57 TMsLogFn::~TMsLogFn() |
|
58 { |
|
59 buf.Zero(); |
|
60 buf.AppendFormat(KFnMsgOut, iThisPointer, &iFunctionName); |
|
61 RDebug::RawPrint(buf); |
|
62 }; |
|
63 |
|
64 #endif |
|