diff -r 22de2e391156 -r 20ac952a623c bluetooth/btlogger/generic/public/logger.h --- a/bluetooth/btlogger/generic/public/logger.h Thu Sep 23 17:06:47 2010 +0300 +++ b/bluetooth/btlogger/generic/public/logger.h Wed Oct 13 16:20:29 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2005-2010 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" @@ -59,6 +59,7 @@ #ifdef __FLOG_ACTIVE #define CONNECT_LOGGER static_cast(CBtLog::Connect()); #define CLOSE_LOGGER CBtLog::Close(); +#define DEFINE_LOG_COMPONENT(a) _LIT8(KLogComponent, a); #define LEAVEIFERRORL(a) VerboseLeaveIfErrorL(KLogComponent, __FILE__, __LINE__, a) #define LEAVEL(a) VerboseLeaveL(KLogComponent, __FILE__, __LINE__, a) #define PANIC(CAT, CODE) VerbosePanic(KLogComponent, __FILE__, __LINE__, CODE, (TText8*)#CODE, CAT) @@ -81,6 +82,7 @@ #else #define CONNECT_LOGGER #define CLOSE_LOGGER +#define DEFINE_LOG_COMPONENT(a) #define LEAVEIFERRORL(a) static_cast(User::LeaveIfError(a)) #define LEAVEL(a) User::Leave(a) #define PANIC(CAT, CODE) User::Panic(CAT, CODE) @@ -141,6 +143,9 @@ // We want a 10-character string (but allow for the NULL terminator). #define PANICCATEGORY(aaa) __ASSERT_COMPILE(sizeof(L##aaa)/2 <= 11); _LIT(KMungedPanicCat, aaa) +#define PANIC_CATEGORY(aaa) PANICCATEGORY(aaa); + +#define DEBUG_PANIC_CATEGORY(aaa) __DEBUG_ONLY(PANICCATEGORY(aaa);) // A handy panic-self macro- the category is whatever has been declared with // BTPANICCATEGORY, with " line#" appended. The panic code is the line number.