networkprotocols/ipeventnotifier/src/HookLog.cpp
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2004-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 //
       
    15 
       
    16 /**
       
    17  @file hooklog.cpp
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #if defined (_DEBUG) && !defined (__WINC__)
       
    22 
       
    23 #include <e32std.h>
       
    24 #include "HookLog.h"
       
    25 #include "comms-infras/commsdebugutility.h"
       
    26 
       
    27 #ifndef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
    28 _LIT(KHookLogFolder, "ipevent");
       
    29 
       
    30 _LIT(KHookLogFile, "ipeventlog.txt");
       
    31 #endif
       
    32 
       
    33 void HookLog::Printf(TRefByValue<const TDesC> aFmt,...)
       
    34 /**
       
    35  * Write a mulitple argument list to the log, trapping and ignoring any leave
       
    36 */
       
    37 	{
       
    38 
       
    39 	VA_LIST list;
       
    40 	VA_START(list,aFmt);
       
    41 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
    42 	CCFLogIf::WriteFormat(KHookLogFolder, KHookLogFile(), aFmt, list);
       
    43 #else
       
    44 	RFileLogger::WriteFormat(KHookLogFolder(), KHookLogFile(), EFileLoggingModeAppend, aFmt, list);
       
    45 #endif
       
    46 	}
       
    47 
       
    48 void HookLog::Printf(TRefByValue<const TDesC8> aFmt,...)
       
    49 /**
       
    50  * Write a mulitple argument list to the log, trapping and ignoring any leave
       
    51  */
       
    52 	{
       
    53 
       
    54 	VA_LIST list;
       
    55 	VA_START(list,aFmt);
       
    56 #ifdef SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY
       
    57 	CCFLogIf::WriteFormat(KHookLogFolder, KHookLogFile(), aFmt, list);
       
    58 #else
       
    59 	RFileLogger::WriteFormat(KHookLogFolder(), KHookLogFile(), EFileLoggingModeAppend, aFmt, list);
       
    60 #endif
       
    61 	}
       
    62 
       
    63 
       
    64 #endif
       
    65