supl/locationsuplfw/protocolhandlerapi/inc/epos_suplpskloger.h
changeset 0 667063e416a2
equal deleted inserted replaced
-1:000000000000 0:667063e416a2
       
     1 /*
       
     2 * Copyright (c) 2006 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 macros
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef SUPLPSKLOGGING_H
       
    21 #define SUPLPSKLOGGING_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <flogger.h>
       
    25 #include <f32file.h>
       
    26 
       
    27 
       
    28 // CONSTANTS
       
    29 
       
    30 // MACROS
       
    31 #ifdef _DEBUG
       
    32 _LIT( KLoggingFolder, "epos" );
       
    33 _LIT( KLoggingFile, "psklog.txt" );
       
    34 _LIT( KLoggingFullName, "c:\\logs\\NppPsy\\log.TXT" );
       
    35 
       
    36 #define CLEARTRACELOG \
       
    37     {RFs fs;fs.Connect();CFileMan* fileMan = CFileMan::NewL( fs ); \
       
    38     fileMan->Delete( KLoggingFullName ); delete fileMan; fs.Close();\
       
    39     }
       
    40     
       
    41 #define TRACETEXT( S1 )         { RFileLogger::Write( KLoggingFolder(),\
       
    42 KLoggingFile(), EFileLoggingModeAppend, S1 ); }
       
    43 
       
    44 #define TRACESTRING( S1 )       { \
       
    45     _LIT( tempLogDes, S1 ); \
       
    46     RFileLogger::Write( KLoggingFolder(), KLoggingFile(), \
       
    47     EFileLoggingModeAppend, tempLogDes() ); \
       
    48     }
       
    49 
       
    50 #define TRACESTRING2( S1, S2 )  { \
       
    51     _LIT( tempLogDes, S1 ); \
       
    52     RFileLogger::WriteFormat( KLoggingFolder(), KLoggingFile(), \
       
    53     EFileLoggingModeAppend, TRefByValue < const TDesC>( tempLogDes() ), S2 ); \
       
    54     }
       
    55 
       
    56 
       
    57 #else   // _DEBUG
       
    58 #define CLEARTRACELOG 
       
    59 #define TRACETEXT( S1 )
       
    60 #define TRACESTRING( S1 )
       
    61 #define TRACESTRING2( S1, S2 )
       
    62 #endif  // _DEBUG
       
    63 
       
    64 // DATA TYPES
       
    65 
       
    66 // FUNCTION PROTOTYPES
       
    67 
       
    68 // FORWARD DECLARATIONS
       
    69 
       
    70 // CLASS DECLARATION
       
    71 
       
    72 #endif  // SUPLPSKLOGGING_H
       
    73 // End of File