omadrm/drmengine/server/inc/drmlog.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 16 Apr 2010 15:14:55 +0300
changeset 23 493788a4a8a4
parent 0 95b198f216e5
permissions -rw-r--r--
Revision: 201011 Kit: 201015

/*
* Copyright (c) 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:  Debug log macro definitions
*
*/



#ifndef DRMLOG_H
#define DRMLOG_H

//  INCLUDES
#if (defined _DEBUG || defined _LOGGING)
#include <e32svr.h>
#include <flogger.h>

// CONSTANTS
// MACROS

#ifndef DRMFLOGFILE
#define DRMFLOGFILE _L("RightsServer.log")
#endif

#define DRMLOG( a ) \
    RFileLogger::Write(_L("drm"), DRMFLOGFILE, EFileLoggingModeAppend, a); \
    RDebug::Print( a );
    
#define DRMLOG2( a, b ) \
    RFileLogger::WriteFormat(_L("drm"), DRMFLOGFILE, EFileLoggingModeAppend, a, b); \
    RDebug::Print( a, b );

#define DRMLOG6( a, b, c, d, e, f ) \
    RFileLogger::WriteFormat(_L("drm"), DRMFLOGFILE, EFileLoggingModeAppend, a, b, c, d, e, f); \
    RDebug::Print( a, b, c, d, e, f );

#define DRMLOG7( a, b, c, d, e, f, g ) \
    RFileLogger::WriteFormat(_L("drm"), DRMFLOGFILE, EFileLoggingModeAppend, a, b, c, d, e, f, g); \
    RDebug::Print( a, b, c, d, e, f, g );
     
#define DRMLOGHEX( a ) \
    RFileLogger::HexDump(_L("drm"), DRMFLOGFILE, EFileLoggingModeAppend, _S(""), _S(""), (a).Ptr(), (a).Size());

#else

#define DRMLOG( a ) 
#define DRMLOG2( a, b ) 
#define DRMLOG6( a, b, c, d, e, f )
#define DRMLOG7( a, b, c, d, e, f, g )
#define DRMLOGHEX( a )

#endif // _DEBUG

// DATA TYPES
// FUNCTION PROTOTYPES
// FORWARD DECLARATIONS
// CLASS DECLARATION

#endif      // DRMLOG_H   
            
// End of File