contextengine/plugins/calendarplugin/inc/CalendarContextLogger.inl
changeset 0 c53acadfccc6
equal deleted inserted replaced
-1:000000000000 0:c53acadfccc6
       
     1 /*
       
     2 * Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Logging support for R&D purposes
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  * 
       
    21  */
       
    22 inline void FPrint( const TRefByValue<const TDesC> aFmt, ... )
       
    23     {
       
    24     VA_LIST list;
       
    25     VA_START( list,aFmt );
       
    26     RFileLogger::WriteFormat( KLBENGLogDir, KLBENGLogFile, EFileLoggingModeAppend, aFmt, list );
       
    27     }
       
    28 
       
    29 /**
       
    30  * 
       
    31  */
       
    32 inline void FPrint( const TDesC& aDes )
       
    33     {
       
    34     RFileLogger::WriteFormat( KLBENGLogDir, KLBENGLogFile, EFileLoggingModeAppend, aDes );
       
    35     }
       
    36 
       
    37 /**
       
    38  * 
       
    39  */
       
    40 inline void FHex( const TUint8* aPtr, TInt aLen )
       
    41     {
       
    42     RFileLogger::HexDump( KLBENGLogDir, KLBENGLogFile, EFileLoggingModeAppend, 0, 0, aPtr, aLen );
       
    43     }
       
    44 
       
    45 /**
       
    46  * 
       
    47  */
       
    48 inline void FHex( const TDesC8& aDes )
       
    49     {
       
    50     FHex( aDes.Ptr(), aDes.Length() );
       
    51     }
       
    52 
       
    53 /**
       
    54  * 
       
    55  */
       
    56 inline void FCreate()
       
    57     {
       
    58     _LIT( KLogPath, "c:\\logs\\" );
       
    59     _LIT( KRootPath, "\\" );
       
    60     TFileName path( KLogPath );
       
    61     path.Append( KLBENGLogDir );
       
    62     path.Append( KRootPath );
       
    63     RFs fs;
       
    64     fs.Connect();
       
    65     fs.MkDirAll( path );
       
    66     fs.Close();
       
    67     RFileLogger::WriteFormat( KLBENGLogDir, KLBENGLogFile, EFileLoggingModeOverwrite, KLBENGLogBanner );
       
    68     }