contactextensions/predefinedcontacts/inc/pdclogger.h
changeset 0 e686773b3f54
equal deleted inserted replaced
-1:000000000000 0:e686773b3f54
       
     1 /*
       
     2 * Copyright (c) 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:    Define log macro and the path for saving log.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DCDLOGGER_H 
       
    20 #define DCDLOGGER_H 
       
    21 
       
    22 #ifdef _DEBUG 
       
    23 #define USE_FILE_LOGGER 
       
    24 #endif 
       
    25 
       
    26 #ifdef USE_FILE_LOGGER 
       
    27 
       
    28     #include <flogger.h> 
       
    29     _LIT(KLogFile,"predefinedcontacts.txt"); 
       
    30     _LIT(KLogFolder,"predefinedcontacts"); 
       
    31     #define LOGTEXT(AAA)                RFileLogger::Write(KLogFolder,KLogFile,EFileLoggingModeAppend,AAA)
       
    32 
       
    33     #define LOGTEXT2(AAA,BBB)           RFileLogger::WriteFormat(KLogFolder, \
       
    34                                                                 KLogFile, \
       
    35                                                                 EFileLoggingModeAppend, \
       
    36                                                                 (AAA), \
       
    37                                                                 (BBB))
       
    38     
       
    39   /*  #define LOGTEXT3(AAA,BBB,CCC)       RFileLogger::WriteFormat(KLogFolder(), \ 
       
    40                                                                  KLogFile(), \ 
       
    41                                                                  EFileLoggingModeAppend, \ 
       
    42                                                                  (AAA), \ 
       
    43                                                                  BBB, \ 
       
    44                                                                  CCC) 
       
    45     /*
       
    46     #define LOGHEXDUMP(AAA,BBB,CCC,DDD) RFileLogger::HexDump(KLogFolder(), \ 
       
    47                                                              KLogFile(), \ 
       
    48                                                              EFileLoggingModeAppend, \ 
       
    49                                                              AAA,\ 
       
    50                                                              BBB,\ 
       
    51                                                              CCC,\ 
       
    52                                                              DDD)    
       
    53                                                            
       
    54 */
       
    55 #else 
       
    56 
       
    57     #define LOGTEXT(AAA)                
       
    58     #define LOGTEXT2(AAA,BBB)           
       
    59     #define LOGTEXT3(AAA,BBB,CCC)       
       
    60     #define LOGHEXDUMP(AAA,BBB,CCC,DDD) 
       
    61     
       
    62 #endif // USE_FILE_LOGGER 
       
    63 
       
    64 #endif // DCDLOGGER_H 
       
    65 
       
    66 // End Of File