phoneapp/phoneuiutils/inc/phonelogger.h
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2002 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: 
       
    15 *     Macro definition file for logging.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __PHONELOGGER_H
       
    21 #define __PHONELOGGER_H
       
    22 
       
    23 // By default, logging will always be switched on.  Later, this may be 
       
    24 // removed, leaving it to individual source files to enable logging where 
       
    25 // needed.
       
    26 #define _LOGGING
       
    27 
       
    28 /*
       
    29  Here we have 3 possible logging methods, or 2 and no logging at all.
       
    30  Later you'll find logic that selects one of these. If you're not happy
       
    31  with that logic in your case, throw it away and just #define your
       
    32  favourite logging method. 
       
    33  set PHONEUI_LOGGER_METHOD to NO_LOGGING to get no logging at all
       
    34  set PHONEUI_LOGGER_METHOD to RDEBUG_LOGGING to get logging via RDebug::Print
       
    35  set PHONEUI_LOGGER_METHOD to FILE_LOGGING to get logging to log file
       
    36  */
       
    37     
       
    38  #define  NO_LOGGING        0   // No logging at all.
       
    39  #define  RDEBUG_LOGGING    1   // Logging via RDebug::Print
       
    40  #define  FILE_LOGGING      2   // Logging to log file
       
    41 
       
    42 /*
       
    43  * here is default logic: if we have DEBUG build then select
       
    44  * logging vua RDebug:Print. If anything else, have no logging at all
       
    45  */
       
    46 #if ( defined (_DEBUG) && defined (_LOGGING) )
       
    47 #define PHONEUI_LOGGING_OUTPUT RDEBUG_LOGGING // <- Here is the place where you can set 
       
    48                                  // debugging method.
       
    49 #else
       
    50 #define PHONEUI_LOGGING_OUTPUT NO_LOGGING
       
    51 #endif// INCLUDES
       
    52 
       
    53 // System includes.
       
    54 #include <e32std.h>
       
    55 #include "cphonelogger.h"
       
    56 
       
    57 #endif // __PHONELOGGER_H