add a way to override default format at build
This commit is contained in:
parent
819a2ebf15
commit
4de679228e
1 changed files with 6 additions and 1 deletions
|
|
@ -30,6 +30,11 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_CLUTCHLOG
|
#ifdef WITH_CLUTCHLOG
|
||||||
|
|
||||||
|
#ifndef CLUTCHLOG_DEFAULT_FORMAT
|
||||||
|
#define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CLUTCHLOC __FILE__, __FUNCTION__, __LINE__
|
#define CLUTCHLOC __FILE__, __FUNCTION__, __LINE__
|
||||||
|
|
||||||
#define CLUTCHLOG( LEVEL, WHAT ) { \
|
#define CLUTCHLOG( LEVEL, WHAT ) { \
|
||||||
|
|
@ -81,7 +86,7 @@ class clutchlog
|
||||||
{level::debug,"D"},
|
{level::debug,"D"},
|
||||||
{level::xdebug,"X"}
|
{level::xdebug,"X"}
|
||||||
}),
|
}),
|
||||||
_format("[{name}] {level}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"),
|
_format(CLUTCHLOG_DEFAULT_FORMAT),
|
||||||
_out(&std::clog),
|
_out(&std::clog),
|
||||||
_depth(std::numeric_limits<size_t>::max() - _strip_calls),
|
_depth(std::numeric_limits<size_t>::max() - _strip_calls),
|
||||||
_stage(level::error),
|
_stage(level::error),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue