cryptomgmtlibs/securitytestfw/test/testhandler2/t_logger.h
changeset 0 2c201484c85f
child 8 35751d3474b7
equal deleted inserted replaced
-1:000000000000 0:2c201484c85f
       
     1 /*
       
     2 * Copyright (c) 2004-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 __T_LOGGER_H__
       
    20 #define __T_LOGGER_H__
       
    21 
       
    22 // Define logging functionality
       
    23 
       
    24 #include <flogger.h>
       
    25 
       
    26 _LIT(KLogDir, "security");
       
    27 _LIT(KLogFile, "testhandler.txt");
       
    28 _LIT(KNewline, "\n");
       
    29 
       
    30 // Log to c:\security\testhandler.txt
       
    31 #define LOG(X) RFileLogger::Write(KLogDir, KLogFile, EFileLoggingModeAppend, (X))
       
    32 #define LOG1(X, Y) RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, (X), (Y))
       
    33 #define LOG2(X, Y, Z) RFileLogger::WriteFormat(KLogDir, KLogFile, EFileLoggingModeAppend, (X), (Y), (Z))
       
    34 
       
    35 // Print to console and log
       
    36 #define PRINTANDLOG(X) LOG(X); iConsole->Printf(X); iConsole->Printf(KNewline);
       
    37 #define PRINTANDLOG1(X, Y) LOG1(X, Y); iConsole->Printf((X), (Y)); iConsole->Printf(KNewline);
       
    38 #define PRINTANDLOG2(X, Y, Z) LOG2(X, Y, Z); iConsole->Printf((X), (Y), (Z)); iConsole->Printf(KNewline);
       
    39 
       
    40 #endif