kerneltest/f32test/shostmassstorage/msman/shared/tmslog.cpp
changeset 300 1d28c8722707
parent 293 0659d0e1a03c
child 301 172f33f13d7d
equal deleted inserted replaced
293:0659d0e1a03c 300:1d28c8722707
     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 #include "tmslog.h"
       
    17 
       
    18 #ifdef TRACE_ENABLED
       
    19 
       
    20 _LIT8(KMsgSIn, ">>\t%S\r\n");
       
    21 _LIT8(KMsgSOut,"<<\t%S\r\n");
       
    22 _LIT8(KMsgIn, ">>[0x%08x]\t%S\r\n");
       
    23 _LIT8(KMsgOut,"<<[0x%08x]\t%S\r\n");
       
    24 
       
    25 
       
    26 TMsLogStaticFn::TMsLogStaticFn(const TDesC8& aFunctionName)
       
    27     {
       
    28     iFunctionName.Set(aFunctionName);
       
    29     buf.AppendFormat(KMsgSIn, &iFunctionName);
       
    30     RDebug::RawPrint(buf);
       
    31     };
       
    32 
       
    33 
       
    34 TMsLogStaticFn::~TMsLogStaticFn()
       
    35     {
       
    36     buf.Zero();
       
    37     buf.AppendFormat(KMsgSOut, &iFunctionName);
       
    38     RDebug::RawPrint(buf);
       
    39     };
       
    40 
       
    41 
       
    42 TMsLogFn::TMsLogFn(const TDesC8& aFunctionName, void* aThisPointer)
       
    43 :   iThisPointer(aThisPointer)
       
    44     {
       
    45     iFunctionName.Set(aFunctionName);
       
    46     buf.AppendFormat(KMsgIn, iThisPointer, &iFunctionName);
       
    47     RDebug::RawPrint(buf);
       
    48     };
       
    49 
       
    50 
       
    51 TMsLogFn::~TMsLogFn()
       
    52     {
       
    53     buf.Zero();
       
    54     buf.AppendFormat(KMsgOut, iThisPointer, &iFunctionName);
       
    55     RDebug::RawPrint(buf);
       
    56     };
       
    57 
       
    58 #endif