kerneltest/f32test/shostmassstorage/testclient/usbtestmsclient/inc/debug.h
changeset 297 b2826f67641f
parent 0 a41df078684a
equal deleted inserted replaced
296:94f2adf59133 297:b2826f67641f
     1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of the License "Eclipse Public License v1.0"
     4 // under the terms of the License "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
    49 #define __PRINTERR(txt, err) {if(KErrNone != err) __PRINT1(txt, err);}
    49 #define __PRINTERR(txt, err) {if(KErrNone != err) __PRINT1(txt, err);}
    50 
    50 
    51 _LIT(KMsgIn, ">>%S\n");
    51 _LIT(KMsgIn, ">>%S\n");
    52 _LIT(KMsgOut,"<<%S\n");
    52 _LIT(KMsgOut,"<<%S\n");
    53 
    53 
    54 class TMSLogFn
       
    55 {
       
    56 	protected:
       
    57 	TBuf<100> iName;
       
    58 
       
    59 	public:
       
    60 	TMSLogFn(const TDesC& aName){iName = aName; RDebug::Print(KMsgIn, &iName);};
       
    61 	~TMSLogFn(){RDebug::Print(KMsgOut, &iName);};
       
    62 };
       
    63 
       
    64 #define __FNLOG(name) TMSLogFn __fn_log__(_L(name))
       
    65 
       
    66 #else
    54 #else
    67 #define __PRINT(t)
    55 #define __PRINT(t)
    68 #define __PRINT1(t,a)
    56 #define __PRINT1(t,a)
    69 #define __PRINT2(t,a,b)
    57 #define __PRINT2(t,a,b)
    70 #define __PRINT3(t,a,b,c)
    58 #define __PRINT3(t,a,b,c)
    71 #define __PRINT4(t,a,b,c,d)
    59 #define __PRINT4(t,a,b,c,d)
    72 #define __PRINT5(t,a,b,c,d,e)
    60 #define __PRINT5(t,a,b,c,d,e)
    73 #define __PRINT8BIT1(t,a)
    61 #define __PRINT8BIT1(t,a)
    74 #define __PRINT1TEMP(t,a)
    62 #define __PRINT1TEMP(t,a)
    75 #define __PRINTERR(txt,err)
    63 #define __PRINTERR(txt,err)
    76 #define __FNLOG(name)
       
    77 #endif
    64 #endif
    78 
    65 
    79 
    66 
    80 #if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    67 #if defined(_SCSI_DEBUG_PRINT_) && (defined(_DEBUG) || defined(_DEBUG_RELEASE))
    81 #define __SCSIPRINT(t) {RDebug::Print(t);}
    68 #define __SCSIPRINT(t) {RDebug::Print(t);}