2016-10-04 21:20:40 +02:00
|
|
|
/** @file
|
2014-03-06 01:37:50 +01:00
|
|
|
* @author Edouard DUPIN
|
2016-10-04 21:20:40 +02:00
|
|
|
* @copyright 2014, Edouard DUPIN, all right reserved
|
|
|
|
* @license APACHE v2.0 (see license file)
|
2014-03-06 01:37:50 +01:00
|
|
|
*/
|
2016-10-04 21:20:40 +02:00
|
|
|
#pragma once
|
2014-03-06 01:37:50 +01:00
|
|
|
|
2016-10-04 21:20:40 +02:00
|
|
|
#include <elog/log.hpp>
|
2014-03-06 01:37:50 +01:00
|
|
|
|
2014-04-30 22:18:00 +02:00
|
|
|
namespace eaudiofx {
|
2014-05-15 21:37:39 +02:00
|
|
|
int32_t getLogId();
|
2014-04-30 22:18:00 +02:00
|
|
|
};
|
2016-10-04 21:20:40 +02:00
|
|
|
#define EAUDIOFX_BASE(info,data) ELOG_BASE(eaudiofx::getLogId(),info,data)
|
2014-03-06 01:37:50 +01:00
|
|
|
|
2016-10-04 21:20:40 +02:00
|
|
|
#define EAUDIOFX_PRINT(data) EAUDIOFX_BASE(1, data)
|
2014-04-30 22:18:00 +02:00
|
|
|
#define EAUDIOFX_CRITICAL(data) EAUDIOFX_BASE(1, data)
|
|
|
|
#define EAUDIOFX_ERROR(data) EAUDIOFX_BASE(2, data)
|
|
|
|
#define EAUDIOFX_WARNING(data) EAUDIOFX_BASE(3, data)
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define EAUDIOFX_INFO(data) EAUDIOFX_BASE(4, data)
|
|
|
|
#define EAUDIOFX_DEBUG(data) EAUDIOFX_BASE(5, data)
|
|
|
|
#define EAUDIOFX_VERBOSE(data) EAUDIOFX_BASE(6, data)
|
|
|
|
#define EAUDIOFX_TODO(data) EAUDIOFX_BASE(4, "TODO : " << data)
|
|
|
|
#else
|
|
|
|
#define EAUDIOFX_INFO(data) do { } while(false)
|
|
|
|
#define EAUDIOFX_DEBUG(data) do { } while(false)
|
|
|
|
#define EAUDIOFX_VERBOSE(data) do { } while(false)
|
|
|
|
#define EAUDIOFX_TODO(data) do { } while(false)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define EAUDIOFX_ASSERT(cond,data) \
|
|
|
|
do { \
|
|
|
|
if (!(cond)) { \
|
|
|
|
EAUDIOFX_CRITICAL(data); \
|
|
|
|
assert(!#cond); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
2014-03-06 01:37:50 +01:00
|
|
|
|
|
|
|
|