mame/src/emu/logmacro.h
Vas Crabb 59ed49f709 Help me template compiler! You are my only hope!
6805 cleanup:
* Reduce massive amounts of redundancy by templating opcode handlers
* Replace the epic switch statement with a dispatch table
* Fix timings for a few instructions
2017-01-20 22:13:25 +11:00

21 lines
534 B
C

// license:BSD-3-Clause
// copyright-holders:Vas Crabb
#if defined(MAME_EMU_LOGMACRO_H) || !defined(__EMU_H__)
#error This file should only be included once per compilation unit after all other headers
#endif
#define MAME_EMU_LOGMACRO_H
#ifndef VERBOSE
#define VERBOSE 0
#endif
#ifndef LOG_OUTPUT_FUNC
#define LOG_OUTPUT_FUNC logerror
#endif
#define LOG_GENERAL (1U << 0)
#define LOGMASKED(mask, ...) do { if (VERBOSE & (mask)) (LOG_OUTPUT_FUNC)(__VA_ARGS__); } while (false)
#define LOG(...) LOGMASKED(LOG_GENERAL, __VA_ARGS__)