alwayson_net_plugin/pdpcontextmanager2/inc/logger.h
author Simon Howkins <simonh@symbian.org>
Thu, 18 Nov 2010 15:05:52 +0000
branchRCL_3
changeset 76 40780c2f3a6b
parent 0 5a93021fdf25
permissions -rw-r--r--
Adjusted to avoid exports, etc, from a top-level bld.inf

/*
* Copyright (c) 2004,2006 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:  Logging macros
*
*/


#ifndef LOGGER_H
#define LOGGER_H

// INCLUDE FILES
#include <e32std.h>
#include <flogger.h>
#include "alwaysonconfig.hrh"

// CONSTANTS
_LIT( KPath, "pdpcm2" );
_LIT( KFile, "AlwaysOn.txt" );

#ifdef LOGGING_ENABLED

#ifdef LOGGING_MODE_FILE

#define LOG_1( a )\
    RFileLogger::Write( KPath, KFile, EFileLoggingModeAppend, a )
#define LOG_2( a, b )\
    RFileLogger::WriteFormat( KPath, KFile, EFileLoggingModeAppend, a, b )
#define LOG_3( a, b, c )\
    RFileLogger::WriteFormat( KPath, KFile, EFileLoggingModeAppend, a, b, c )
    
#else
    
#define LOG_1( a ) RDebug::Print( a )
#define LOG_2( a, b ) RDebug::Print( a, b )
#define LOG_3( a, b, c ) RDebug::Print( a, b, c )
    
#endif // LOGGING_MODE_FILE

#else

#define LOG_1( a )
#define LOG_2( a, b )
#define LOG_3( a, b, c )

#endif // LOGGING_ENABLED

#endif // LOGGER_H