sl@0: /** sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: /** sl@0: @file RFileLoggermacro.h sl@0: */ sl@0: sl@0: #if !(defined __ET_RFILELOGGERMACRO_H__) sl@0: #define __ET_RFILELOGGERMACRO_H__ sl@0: sl@0: #include sl@0: #ifdef _DEBUG sl@0: #ifndef __FILELOGGER_ACTIVE sl@0: #define __FILELOGGER_ACTIVE sl@0: #endif sl@0: #endif sl@0: sl@0: #if defined (__FILELOGGER_ACTIVE ) || defined (SWTRACE_ACTIVE) sl@0: #define __FLOG_DECLARATION_MEMBER RFileFlogger __logger__ sl@0: //------------ sl@0: #define __FLOG_CONNECT __logger__.Connect() sl@0: sl@0: #define __FLOG_CREATE(alogfilepath,amode) __logger__.CreateLog((alogfilepath),(amode)) sl@0: sl@0: #define __FLOG_CLOSE __logger__.Close() sl@0: sl@0: #define __FLOG_SETLOGLEVEL(aloglevel) __logger__.SetLogLevel((aloglevel)) sl@0: sl@0: sl@0: //-------- sl@0: #define __FLOG_INFO1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1)) sl@0: #define __FLOG_INFO2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2)) sl@0: #define __FLOG_INFO3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3)) sl@0: #define __FLOG_INFO4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_INFO5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_INFO6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_INFO7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: #define __FLOG_WARN1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1)) sl@0: #define __FLOG_WARN2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2)) sl@0: #define __FLOG_WARN3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3)) sl@0: #define __FLOG_WARN4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_WARN5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_WARN6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_WARN7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: #define __FLOG_ERR1(p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1)) sl@0: #define __FLOG_ERR2(p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2)) sl@0: #define __FLOG_ERR3(p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3)) ; sl@0: #define __FLOG_ERR4(p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_ERR5(p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_ERR6(p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_ERR7(p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: // for extra log fields sl@0: #define __FLOG_EXTRA_INFO1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1)) sl@0: #define __FLOG_EXTRA_INFO2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2)) sl@0: #define __FLOG_EXTRA_INFO3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3)) sl@0: #define __FLOG_EXTRA_INFO4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_EXTRA_INFO5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_EXTRA_INFO6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_EXTRA_INFO7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrInfo, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: #define __FLOG_EXTRA_WARN1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1)) sl@0: #define __FLOG_EXTRA_WARN2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2)) sl@0: #define __FLOG_EXTRA_WARN3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3)) sl@0: #define __FLOG_EXTRA_WARN4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_EXTRA_WARN5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_EXTRA_WARN6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_EXTRA_WARN7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrWarn, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: #define __FLOG_EXTRA_ERR1(length, extra, p1) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1)) sl@0: #define __FLOG_EXTRA_ERR2(length, extra, p1, p2) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2)) sl@0: #define __FLOG_EXTRA_ERR3(length, extra, p1, p2, p3) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3)) ; sl@0: #define __FLOG_EXTRA_ERR4(length, extra, p1, p2, p3, p4) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4)) sl@0: #define __FLOG_EXTRA_ERR5(length, extra, p1, p2, p3, p4, p5) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5)) sl@0: #define __FLOG_EXTRA_ERR6(length, extra, p1, p2, p3, p4, p5, p6) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6)) sl@0: #define __FLOG_EXTRA_ERR7(length, extra, p1, p2, p3, p4, p5, p6, p7) __logger__.Log(((TText8*)__FILE__), __LINE__, RFileFlogger::ESevrErr, (length), (extra), (p1), (p2), (p3), (p4), (p5), (p6), (p7)) sl@0: sl@0: #else sl@0: #define __FILELOG_DECLARATION_MEMBER sl@0: //------------ sl@0: #define __FLOG_CONNECT sl@0: sl@0: #define __FLOG_CREATE(alogfilepath,amode) sl@0: sl@0: #define __FLOG_CLOSE sl@0: sl@0: //-------- sl@0: #define __FLOG_INFO1(p1) sl@0: #define __FLOG_INFO2(p1, p2) sl@0: #define __FLOG_INFO3(p1, p2, p3) sl@0: #define __FLOG_INFO4(p1, p2, p3, p4) sl@0: #define __FLOG_INFO5(p1, p2, p3, p4, p5) sl@0: #define __FLOG_INFO6(p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_INFO7(p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: #define __FLOG_WARN1(p1) sl@0: #define __FLOG_WARN2(p1, p2) sl@0: #define __FLOG_WARN3(p1, p2, p3) sl@0: #define __FLOG_WARN4(p1, p2, p3, p4) sl@0: #define __FLOG_WARN5(p1, p2, p3, p4, p5) sl@0: #define __FLOG_WARN6(p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_WARN7(p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: #define __FLOG_ERR1(p1) sl@0: #define __FLOG_ERR2(p1, p2) sl@0: #define __FLOG_ERR3(p1, p2, p3) sl@0: #define __FLOG_ERR4(p1, p2, p3, p4) sl@0: #define __FLOG_ERR5(p1, p2, p3, p4, p5) sl@0: #define __FLOG_ERR6(p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_ERR7(p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: // for extra log fields sl@0: #define __FLOG_EXTRA_INFO1(length, extra, p1) sl@0: #define __FLOG_EXTRA_INFO2(length, extra, p1, p2) sl@0: #define __FLOG_EXTRA_INFO3(length, extra, p1, p2, p3) sl@0: #define __FLOG_EXTRA_INFO4(length, extra, p1, p2, p3, p4) sl@0: #define __FLOG_EXTRA_INFO5(length, extra, p1, p2, p3, p4, p5) sl@0: #define __FLOG_EXTRA_INFO6(length, extra, p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_EXTRA_INFO7(length, extra, p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: #define __FLOG_EXTRA_WARN1(length, extra, p1) sl@0: #define __FLOG_EXTRA_WARN2(length, extra, p1, p2) sl@0: #define __FLOG_EXTRA_WARN3(length, extra, p1, p2, p3) sl@0: #define __FLOG_EXTRA_WARN4(length, extra, p1, p2, p3, p4) sl@0: #define __FLOG_EXTRA_WARN5(length, extra, p1, p2, p3, p4, p5) sl@0: #define __FLOG_EXTRA_WARN6(length, extra, p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_EXTRA_WARN7(length, extra, p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: #define __FLOG_EXTRA_ERR1(length, extra, p1) sl@0: #define __FLOG_EXTRA_ERR2(length, extra, p1, p2) sl@0: #define __FLOG_EXTRA_ERR3(length, extra, p1, p2, p3) sl@0: #define __FLOG_EXTRA_ERR4(length, extra, p1, p2, p3, p4) sl@0: #define __FLOG_EXTRA_ERR5(length, extra, p1, p2, p3, p4, p5) sl@0: #define __FLOG_EXTRA_ERR6(length, extra, p1, p2, p3, p4, p5, p6) sl@0: #define __FLOG_EXTRA_ERR7(length, extra, p1, p2, p3, p4, p5, p6, p7) sl@0: sl@0: #endif sl@0: #endif