os/kernelhwsrv/userlibandfileserver/fileserver/shostmassstorage/msproxy/debug.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 /**
    17  @file
    18  @internalTechnology
    19 */
    20 
    21 #include "debug.h"
    22 
    23 #ifdef FUNCTION_TRACE_ENABLED
    24 
    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");
    29 
    30 TLogStaticFn::TLogStaticFn(const TDesC8& aFunctionName)
    31     {
    32     iFunctionName.Set(aFunctionName);
    33     buf.AppendFormat(KFnMsgSIn, &iFunctionName);
    34     RDebug::RawPrint(buf);
    35     };
    36 
    37 
    38 TLogStaticFn::~TLogStaticFn()
    39     {
    40     buf.Zero();
    41     buf.AppendFormat(KFnMsgSOut, &iFunctionName);
    42     RDebug::RawPrint(buf);
    43     };
    44 
    45 
    46 TLogFn::TLogFn(const TDesC8& aFunctionName, void* aThisPointer)
    47 :   iThisPointer(aThisPointer)
    48     {
    49     iFunctionName.Set(aFunctionName);
    50     buf.AppendFormat(KFnMsgIn, iThisPointer, &iFunctionName);
    51     RDebug::RawPrint(buf);
    52     };
    53 
    54 
    55 TLogFn::~TLogFn()
    56     {
    57     buf.Zero();
    58     buf.AppendFormat(KFnMsgOut, iThisPointer, &iFunctionName);
    59     RDebug::RawPrint(buf);
    60     };
    61 
    62 #endif