os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/msproxy/debug.cpp
First public contribution.
1 // Copyright (c) 2008-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
23 #ifdef FUNCTION_TRACE_ENABLED
25 _LIT8(KFnMsgSIn, ">>\t%S\r\n");
26 _LIT8(KFnMsgSOut,"<<\t%S\r\n");
27 _LIT8(KFnMsgIn, ">>[0x%08x]\t%S\r\n");
28 _LIT8(KFnMsgOut,"<<[0x%08x]\t%S\r\n");
30 TLogStaticFn::TLogStaticFn(const TDesC8& aFunctionName)
32 iFunctionName.Set(aFunctionName);
33 buf.AppendFormat(KFnMsgSIn, &iFunctionName);
34 RDebug::RawPrint(buf);
38 TLogStaticFn::~TLogStaticFn()
41 buf.AppendFormat(KFnMsgSOut, &iFunctionName);
42 RDebug::RawPrint(buf);
46 TLogFn::TLogFn(const TDesC8& aFunctionName, void* aThisPointer)
47 : iThisPointer(aThisPointer)
49 iFunctionName.Set(aFunctionName);
50 buf.AppendFormat(KFnMsgIn, iThisPointer, &iFunctionName);
51 RDebug::RawPrint(buf);
58 buf.AppendFormat(KFnMsgOut, iThisPointer, &iFunctionName);
59 RDebug::RawPrint(buf);