appinstaller/AppinstUi/Client/Inc/SWInstDebug.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Tue, 25 May 2010 12:50:16 +0300
branchRCL_3
changeset 36 f9033e605ee2
parent 0 ba25891c3a9e
permissions -rw-r--r--
Revision: 201019 Kit: 2010121

/*
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:   This file defines logging macros for SW Installer UIs.
*
*/


#ifndef SWINSTDEBUG_H
#define SWINSTDEBUG_H


#ifdef _DEBUG

#include <e32std.h>

#define FLOG(a)   { FPrint(a); }
#define FLOG_1(a,b)   { FPrint(a,b); }
#define FLOG_2(a,b,c)   { FPrint(a,b,c); }
#define FLOG_3(a,b,c,d)   { FPrint(a,b,c,d); }

#include <flogger.h>

_LIT(KLogFile,"SWInst.txt");
_LIT(KLogDir,"SWInst");

inline void FPrint( const TRefByValue<const TDesC> aFmt, ... )
    {
    VA_LIST list;
    VA_START( list, aFmt );
    RFileLogger::WriteFormat( KLogDir, KLogFile, EFileLoggingModeAppend, aFmt, list );
    }

// ===========================================================================
#else // // No loggings
// ===========================================================================
#define FLOG(a)
#define FLOG_1(a,b)   
#define FLOG_2(a,b,c) 
#define FLOG_3(a,b,c,d)

#endif // _DEBUG

#endif // SWINSTDEBUG_H

// End of File