networkprotocols/iphook/inhook6/inc/inet6log.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 1997-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 "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 // LOG.H
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @internalComponent
       
    20 */
       
    21 
       
    22 //Logging is now using CDU instead of flogger.
       
    23 #ifndef INET6LOG_H
       
    24 #define INET6LOG_H
       
    25 
       
    26 #include <comms-infras/commsdebugutility.h>
       
    27 
       
    28 #ifdef __FLOG_ACTIVE
       
    29 #include <cflog.h>
       
    30 
       
    31 #  define LOG(a) a 
       
    32 #  define _LOG
       
    33 
       
    34 //subsystem name for logging component use this file for logging
       
    35 _LIT8(KTcpip6Subsystem,"inet6");
       
    36 
       
    37 //defining component name
       
    38 #ifndef TCPIP6_COMPNAME
       
    39 #define TCPIP6_COMPNAME "tcpip6"
       
    40 #endif
       
    41 
       
    42 _LIT8(KTcpip6Component,TCPIP6_COMPNAME);
       
    43 
       
    44 namespace Log
       
    45 {
       
    46 	static void Write(const TDesC& aDes)
       
    47 	{
       
    48 	CCFLogIf::Write(KTcpip6Subsystem, KTcpip6Component, aDes);
       
    49 	}
       
    50 
       
    51 	static void Printf(TRefByValue<const TDesC> aFmt, ...)
       
    52 	{
       
    53 	VA_LIST list;
       
    54 	VA_START(list,aFmt);
       
    55 	CCFLogIf::WriteFormat(KTcpip6Subsystem, KTcpip6Component, aFmt, list);
       
    56 	VA_END(list);
       
    57 	}
       
    58 	
       
    59 	static void Printf(TRefByValue<const TDesC8> aFmt, ...)
       
    60 	{
       
    61 	VA_LIST list;
       
    62 	VA_START(list,aFmt);
       
    63 	CCFLogIf::WriteFormat(KTcpip6Subsystem, KTcpip6Component, aFmt, list);
       
    64 	VA_END(list);
       
    65 	}
       
    66 
       
    67 	static void HexDump(const TText* aHeader, const TText* aMargin, const TUint8* aPtr, TInt aLen)
       
    68 	{
       
    69 	CCFLogIf::HexDump(KTcpip6Subsystem, KTcpip6Component, aHeader, aMargin, aPtr, aLen);
       
    70 	}
       
    71 }//end of namespace.
       
    72 
       
    73 #else //!flog active
       
    74 
       
    75 #define LOG(a)
       
    76 #endif //flog active
       
    77 
       
    78 #endif //INET6LOG_H