0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-29 23:38:18 +02:00

ircd::log: #ifdef over the full structure.

This commit is contained in:
Jason Volk 2018-04-23 14:17:38 -07:00
parent 27ff5e9be1
commit d2eda8a4bf

View file

@ -113,21 +113,24 @@ struct ircd::log::console_quiet
~console_quiet(); ~console_quiet();
}; };
#ifdef RB_DEBUG
struct ircd::log::debug struct ircd::log::debug
{ {
#ifdef RB_DEBUG
template<class... args> template<class... args>
debug(const char *const &fmt, args&&... a) debug(const char *const &fmt, args&&... a)
{ {
vlog(facility::DEBUG, fmt, va_rtti{std::forward<args>(a)...}); vlog(facility::DEBUG, fmt, va_rtti{std::forward<args>(a)...});
} }
#else };
#else
struct ircd::log::debug
{
debug(const char *const &, ...) debug(const char *const &, ...)
{ {
// Required in gcc 6.3.0 20170519, template param packs are not DCE'ed // Required in gcc 6.3.0 20170519, template param packs are not DCE'ed
} }
#endif
}; };
#endif
struct ircd::log::info struct ircd::log::info
{ {
@ -147,21 +150,24 @@ struct ircd::log::notice
} }
}; };
#ifdef RB_DEBUG
struct ircd::log::dwarning struct ircd::log::dwarning
{ {
#ifdef RB_DEBUG
template<class... args> template<class... args>
dwarning(const char *const &fmt, args&&... a) dwarning(const char *const &fmt, args&&... a)
{ {
vlog(facility::DWARNING, fmt, va_rtti{std::forward<args>(a)...}); vlog(facility::DWARNING, fmt, va_rtti{std::forward<args>(a)...});
} }
#else };
#else
struct ircd::log::dwarning
{
dwarning(const char *const &, ...) dwarning(const char *const &, ...)
{ {
// Required in gcc 6.3.0 20170519, template param packs are not DCE'ed // Required in gcc 6.3.0 20170519, template param packs are not DCE'ed
} }
#endif
}; };
#endif
struct ircd::log::warning struct ircd::log::warning
{ {
@ -172,21 +178,24 @@ struct ircd::log::warning
} }
}; };
#ifdef RB_DEBUG
struct ircd::log::derror struct ircd::log::derror
{ {
#ifdef RB_DEBUG
template<class... args> template<class... args>
derror(const char *const &fmt, args&&... a) derror(const char *const &fmt, args&&... a)
{ {
vlog(facility::DERROR, fmt, va_rtti{std::forward<args>(a)...}); vlog(facility::DERROR, fmt, va_rtti{std::forward<args>(a)...});
} }
#else };
#else
struct ircd::log::derror
{
derror(const char *const &, ...) derror(const char *const &, ...)
{ {
// Required in gcc 6.3.0 20170519, template param packs are not DCE'ed // Required in gcc 6.3.0 20170519, template param packs are not DCE'ed
} }
#endif
}; };
#endif
struct ircd::log::error struct ircd::log::error
{ {