dvrengine/CommonRecordingEngine/inc/videoserviceutilsLogger.h
branchRCL_3
changeset 47 826cea16efd9
parent 45 798ee5f1972c
child 48 13a33d82ad98
equal deleted inserted replaced
45:798ee5f1972c 47:826cea16efd9
     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 the License "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 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __VIDEOSERVICEUTILSLOGGER_H__
       
    20 #define __VIDEOSERVICEUTILSLOGGER_H__
       
    21 
       
    22 #include <e32debug.h>
       
    23 #include <flogger.h>
       
    24 
       
    25 _LIT( KDirectory, "livetv" );
       
    26 _LIT( KFileName, "livetv2.log" );
       
    27 _LIT( KTimeDateFormat,"%D%M%Y%/0%1%/1%2%/2%3%/3 %-B%:0%J%:1%T%:2%S%:3%+B");
       
    28 
       
    29 //#define LIVE_TV_RDEBUG_TRACE
       
    30 #ifdef _DEBUG
       
    31 #define LIVE_TV_FILE_TRACE
       
    32 #endif // _DEBUG
       
    33 #ifdef LIVE_TV_RDEBUG_TRACE
       
    34   #define LIVE_TV_TRACE1(a) RDebug::Print(a)
       
    35   #define LIVE_TV_TRACE2(a,b) RDebug::Print(a,b)
       
    36   #define LIVE_TV_TRACE3(a,b,c) RDebug::Print(a,b,c)
       
    37   #define LIVE_TV_TRACE4(a,b,c,d) RDebug::Print(a,b,c,d)
       
    38   #define LIVE_TV_TRACE5(a,b,c,d,e) RDebug::Print(a,b,c,d,e)
       
    39   #define LOG(AAA) { LIVE_TV_TRACE1(_L(AAA)); }
       
    40   #define LOG1(AAA,BBB) { LIVE_TV_TRACE2(_L(AAA),BBB); }
       
    41   #define LOG2(AAA,BBB,CCC) { LIVE_TV_TRACE3(_L(AAA),BBB,CCC); }
       
    42   #define LOG3(AAA,BBB,CCC,DDD) { LIVE_TV_TRACE4(_L(AAA),BBB,CCC,DDD); }
       
    43   #define LOG4(AAA,BBB,CCC,DDD,EEE) { LIVE_TV_TRACE4(_L(AAA),BBB,CCC,DDD,EEE); }
       
    44 #else
       
    45   #ifdef LIVE_TV_FILE_TRACE
       
    46     #define LIVE_TV_TRACE1(a) { RFileLogger::Write( KDirectory, KFileName, EFileLoggingModeAppend, a ); }
       
    47     #define LIVE_TV_TRACE2(a,b) { RFileLogger::WriteFormat( KDirectory, KFileName, EFileLoggingModeAppend, a, b );}
       
    48     #define LIVE_TV_TRACE3(a,b,c) { RFileLogger::WriteFormat( KDirectory, KFileName, EFileLoggingModeAppend, a, b, c ); }
       
    49     #define LIVE_TV_TRACE4(a,b,c,d) { RFileLogger::WriteFormat( KDirectory, KFileName, EFileLoggingModeAppend, a, b, c, d ); }
       
    50     #define LIVE_TV_TRACE5(a,b,c,d,e) { RFileLogger::WriteFormat( KDirectory, KFileName, EFileLoggingModeAppend, a, b, c, d, e ); }
       
    51     #define LOG(AAA) { LIVE_TV_TRACE1(_L(AAA)); }
       
    52     #define LOG1(AAA,BBB) { LIVE_TV_TRACE2(_L(AAA),BBB); }
       
    53     #define LOG2(AAA,BBB,CCC) { LIVE_TV_TRACE3(_L(AAA),BBB,CCC); }
       
    54     #define LOG3(AAA,BBB,CCC,DDD) { LIVE_TV_TRACE4(_L(AAA),BBB,CCC,DDD); }
       
    55     #define LOG4(AAA,BBB,CCC,DDD,EEE) { LIVE_TV_TRACE4(_L(AAA),BBB,CCC,DDD,EEE); }
       
    56   #else
       
    57     #define LIVE_TV_TRACE1(a)
       
    58     #define LIVE_TV_TRACE2(a,b)
       
    59     #define LIVE_TV_TRACE3(a,b,c)
       
    60     #define LIVE_TV_TRACE4(a,b,c,d)
       
    61     #define LIVE_TV_TRACE5(a,b,c,d,e)
       
    62     #define LOG(AAA)
       
    63     #define LOG1(AAA,BBB)
       
    64     #define LOG2(AAA,BBB,CCC)
       
    65     #define LOG3(AAA,BBB,CCC,DDD)
       
    66     #define LOG4(AAA,BBB,CCC,DDD,EEE)
       
    67   #endif
       
    68 #endif
       
    69 	
       
    70 #endif// __VIDEOSERVICEUTILSLOGGER_H__
       
    71 
       
    72 // End of file