sl@0: // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: #include "tmslog.h" sl@0: sl@0: #ifdef TRACE_ENABLED sl@0: sl@0: _LIT8(KMsgSIn, ">>\t%S\r\n"); sl@0: _LIT8(KMsgSOut,"<<\t%S\r\n"); sl@0: _LIT8(KMsgIn, ">>[0x%08x]\t%S\r\n"); sl@0: _LIT8(KMsgOut,"<<[0x%08x]\t%S\r\n"); sl@0: sl@0: sl@0: TMsLogStaticFn::TMsLogStaticFn(const TDesC8& aFunctionName) sl@0: { sl@0: iFunctionName.Set(aFunctionName); sl@0: buf.AppendFormat(KMsgSIn, &iFunctionName); sl@0: RDebug::RawPrint(buf); sl@0: }; sl@0: sl@0: sl@0: TMsLogStaticFn::~TMsLogStaticFn() sl@0: { sl@0: buf.Zero(); sl@0: buf.AppendFormat(KMsgSOut, &iFunctionName); sl@0: RDebug::RawPrint(buf); sl@0: }; sl@0: sl@0: sl@0: TMsLogFn::TMsLogFn(const TDesC8& aFunctionName, void* aThisPointer) sl@0: : iThisPointer(aThisPointer) sl@0: { sl@0: iFunctionName.Set(aFunctionName); sl@0: buf.AppendFormat(KMsgIn, iThisPointer, &iFunctionName); sl@0: RDebug::RawPrint(buf); sl@0: }; sl@0: sl@0: sl@0: TMsLogFn::~TMsLogFn() sl@0: { sl@0: buf.Zero(); sl@0: buf.AppendFormat(KMsgOut, iThisPointer, &iFunctionName); sl@0: RDebug::RawPrint(buf); sl@0: }; sl@0: sl@0: #endif