Skip to content

Commit 7b9fbe2

Browse files
committed
Remove VERBOSE, put in a forced error message
Now if you try to use VERBOSE instead of LOG, you will get a compile-time error message like: mythlogging.cpp: In function ‘QString logStrerror(int)’: mythlogging.cpp:1163: error: call to ‘VERBOSE’ declared with attribute error: VERBOSE is gone, use LOG The conversion is complete. Next step is to sweep through all the changes looking for LOC that shouldn't have been removed, and obvious boneheaded mismappings.
1 parent e457e31 commit 7b9fbe2

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

mythtv/libs/libmythbase/mythlogging.h

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ typedef struct
9090
extern "C" {
9191
#endif
9292

93+
// There are two LOG macros now. One for use with Qt/C++, one for use
94+
// without Qt.
95+
//
96+
// Neither of them will lock the calling thread other than momentarily to put
97+
// the log message onto a queue.
9398
#ifdef __cplusplus
9499
#define LOG(mask, level, string) \
95100
LogPrintLine(mask, (LogLevel_t)level, __FILE__, __LINE__, __FUNCTION__, \
@@ -232,20 +237,8 @@ extern MBASE_PUBLIC uint64_t verboseMask;
232237
#define VERBOSE_LEVEL_NONE (verboseMask == 0)
233238
#define VERBOSE_LEVEL_CHECK(mask) ((verboseMask & (mask)) == (mask))
234239

235-
// There are two VERBOSE macros now. One for use with Qt/C++, one for use
236-
// without Qt.
237-
//
238-
// Neither of them will lock the calling thread, but rather put the log message
239-
// onto a queue.
240-
241-
#ifdef __cplusplus
242-
#define VERBOSE(mask, ...) \
243-
LOG((uint64_t)(mask), LOG_INFO, QString(__VA_ARGS__))
244-
#else
245-
#define VERBOSE(mask, ...) \
246-
LOG((uint64_t)(mask), LOG_INFO, __VA_ARGS__)
247-
#endif
248-
240+
MBASE_PUBLIC __attribute__((error("VERBOSE is gone, use LOG")))
241+
void VERBOSE(uint64_t mask, ...);
249242

250243
#ifdef __cplusplus
251244
/// Verbose helper function for ENO macro

0 commit comments

Comments
 (0)