feat: remove location if not in Debug builds
This commit is contained in:
parent
35e4b67861
commit
e72ceecc00
1 changed files with 18 additions and 7 deletions
|
|
@ -168,14 +168,25 @@ class clutchlog
|
||||||
|
|
||||||
/** @addtogroup UseMacros High-level API macros
|
/** @addtogroup UseMacros High-level API macros
|
||||||
* @{ */
|
* @{ */
|
||||||
|
#ifndef NDEBUG
|
||||||
#ifndef CLUTCHLOG_DEFAULT_FORMAT
|
#ifndef CLUTCHLOG_DEFAULT_FORMAT
|
||||||
//! Compile-time default format of the messages.
|
//! Compile-time default format of the messages (debug mode: with absolute location).
|
||||||
#if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
|
#if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
|
||||||
#define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
|
#define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
|
||||||
#else
|
#else
|
||||||
#define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
|
#define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
|
||||||
#endif
|
#endif
|
||||||
#endif // CLUTCHLOG_DEFAULT_FORMAT
|
#endif
|
||||||
|
#else
|
||||||
|
#ifndef CLUTCHLOG_DEFAULT_FORMAT
|
||||||
|
//! Compile-time default format of the messages (debug mode: with absolute location).
|
||||||
|
#if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
|
||||||
|
#define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg}\n"
|
||||||
|
#else
|
||||||
|
#define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\n"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
//! Default format of the messages.
|
//! Default format of the messages.
|
||||||
static inline std::string default_format = CLUTCHLOG_DEFAULT_FORMAT;
|
static inline std::string default_format = CLUTCHLOG_DEFAULT_FORMAT;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue