diff --git a/CMakeLists.txt b/CMakeLists.txt
index 507a7f8..b794cc4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
project("clutchlog"
- VERSION 0.15
+ VERSION 0.16
DESCRIPTION "A logging system which targets versatile debugging")
enable_language(CXX) # C++
diff --git a/docs/annotated.html b/docs/annotated.html
index c9f4a52..7a8cdd9 100644
--- a/docs/annotated.html
+++ b/docs/annotated.html
@@ -28,7 +28,7 @@
@@ -369,9 +369,9 @@ void operator= (
Get the logger instance.
-
@@ -403,9 +403,9 @@ void operator= (Style will be chosen based on the hash value of the filename among the candidate ones.
See the {filehash_fmt} template tag.
-Definition at line 1028 of file clutchlog.h .
+Definition at line 1038 of file clutchlog.h .
-References _filehash_fmts .
+References _filehash_fmts .
@@ -437,9 +437,9 @@ void operator= (Style will be chosen based on the hash value of the filename among the candidate ones.
See the {funchash_fmt} template tag.
-Definition at line 1036 of file clutchlog.h .
+Definition at line 1046 of file clutchlog.h .
-References _funchash_fmts .
+References _funchash_fmts .
@@ -471,7 +471,7 @@ void operator= (The given list should be ordered, styles will be applied for the corresponding depth level. If the actual depth is larger than the number of styles, the last one is used.
See the {depth_fmt} template tag.
-Definition at line 1045 of file clutchlog.h .
+Definition at line 1055 of file clutchlog.h .
@@ -502,11 +502,11 @@ void operator= (Return the log level tag corresponding to the given pre-configured name.
Note This is case sensitive, see the pre-configured _level_word.
-Definition at line 1060 of file clutchlog.h .
+Definition at line 1070 of file clutchlog.h .
-References _word_level .
+References _word_level .
-Referenced by threshold() .
+Referenced by threshold() .
@@ -549,11 +549,11 @@ template<class ... FMT>
Set the style (color and typo) of the given log level.
This version accept style arguments as if they were passed to clutchlog::fmt .
-Definition at line 1094 of file clutchlog.h .
+Definition at line 1104 of file clutchlog.h .
-References style() .
+References style() .
-Referenced by style() .
+Referenced by style() .
@@ -598,12 +598,12 @@ template<class ... FMT>
Replace mark by tag in form.
-
@@ -612,8 +612,8 @@ template<class ... FMT>
-void log(const level &stage, const std::string &what, const std::string &file, const std::string &func, size_t line) const
Print a log message IF the location matches the given one.
-static clutchlog & logger()
Get the logger instance.
+static clutchlog & logger()
Get the logger instance.
+void log(const level &stage, const std::string &what, const std::string &file, const std::string &func, const size_t line, const size_t depth_delta=0) const
Print a log message IF the location matches the given one.
diff --git a/docs/classclutchlog.js b/docs/classclutchlog.js
index 8ecfbc8..4dabb74 100644
--- a/docs/classclutchlog.js
+++ b/docs/classclutchlog.js
@@ -30,8 +30,8 @@ var classclutchlog =
[ "replace", "classclutchlog.html#a972f895c70edc335f3018a2c8971d59e", null ],
[ "replace", "classclutchlog.html#ae90d5a1a428587ad67b38b2ea4ca9fa2", null ],
[ "format", "classclutchlog.html#abd692cca9a2e772e7c9d6531bb3c7761", null ],
- [ "log", "classclutchlog.html#a23dbb98f0d3c5cc21c232cde16cf317a", null ],
- [ "dump", "classclutchlog.html#a63308e8deae3cfec6801318203494143", null ],
+ [ "log", "classclutchlog.html#a14c19e17c54d6353ba34c0dc3371094a", null ],
+ [ "dump", "classclutchlog.html#ab72a0adc9ff287270afe09c9da825fdb", null ],
[ "default_format", "classclutchlog.html#a0c4ac57601e6f8d146fd5cc060968ecc", null ],
[ "dump_default_format", "classclutchlog.html#ace879554298e6e6e36dafef330c27be8", null ],
[ "dump_default_sep", "classclutchlog.html#af898bffe23b125245e338d7495c76d45", null ],
diff --git a/docs/classclutchlog_1_1fmt-members.html b/docs/classclutchlog_1_1fmt-members.html
index 8f9cbb5..5b01093 100644
--- a/docs/classclutchlog_1_1fmt-members.html
+++ b/docs/classclutchlog_1_1fmt-members.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/classclutchlog_1_1fmt.html b/docs/classclutchlog_1_1fmt.html
index b1bb17c..4a78df2 100644
--- a/docs/classclutchlog_1_1fmt.html
+++ b/docs/classclutchlog_1_1fmt.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -154,7 +154,7 @@ $(document).ready(function(){initNavTree('classclutchlog_1_1fmt.html',''); initR
All styles may not be supported by a given terminal/operating system.
-Definition at line 366 of file clutchlog.h .
+Definition at line 376 of file clutchlog.h .
@@ -415,9 +415,9 @@ std::ostream & std::cout << error("ERROR" ) << std::endl;
Note A formatter called this way WILL output a reset escape code at the end.
-Definition at line 795 of file clutchlog.h .
+Definition at line 805 of file clutchlog.h .
-References print_on() .
+References print_on() .
@@ -462,7 +462,7 @@ std::ostream & std::cout << error << "ERROR" << end << std::endl;
Note An formatter called this way will NOT output a reset escape code.
-Definition at line 780 of file clutchlog.h .
+Definition at line 790 of file clutchlog.h .
@@ -497,7 +497,7 @@ std::ostream & Definition at line 369 of file clutchlog.h .
+Definition at line 379 of file clutchlog.h .
@@ -506,7 +506,7 @@ std::ostream & Color and style formatter for ANSI terminal escape sequences.
+Color and style formatter for ANSI terminal escape sequences.
diff --git a/docs/classes.html b/docs/classes.html
index 551abe0..c2aad5a 100644
--- a/docs/classes.html
+++ b/docs/classes.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/clutchlog_8h.html b/docs/clutchlog_8h.html
index afb9e50..2dbb3b1 100644
--- a/docs/clutchlog_8h.html
+++ b/docs/clutchlog_8h.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -114,8 +114,7 @@ $(document).ready(function(){initNavTree('clutchlog_8h.html',''); initResizable(
Go to the source code of this file.
@@ -179,8 +178,12 @@ Macros
#define CLUTCHLOC __FILE__, __FUNCTION__, __LINE__
Handy shortcuts to location.
-#define CLUTCHLOG (LEVEL, WHAT)
- Log a message at the given level. More...
+#define CLUTCHLOGD (LEVEL, WHAT, DEPTH_DELTA)
+ Log a message at the given level and with a given depth delta. More...
+
+
+#define CLUTCHLOG (LEVEL, WHAT) CLUTCHLOGD (LEVEL, WHAT, 0)
+ Log a message at the given level.
#define CLUTCHDUMP (LEVEL, CONTAINER, FILENAME)
Dump the given container. More...
diff --git a/docs/clutchlog_8h.js b/docs/clutchlog_8h.js
index 05cb530..bf6872c 100644
--- a/docs/clutchlog_8h.js
+++ b/docs/clutchlog_8h.js
@@ -7,6 +7,7 @@ var clutchlog_8h =
[ "WITH_CLUTCHLOG", "clutchlog_8h.html#a5c126962abcc7a40e504a6fc3abdfcc4", null ],
[ "CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG", "group___default_config.html#ga8564be479b948ee3052b61783c66d415", null ],
[ "CLUTCHLOC", "group___use_macros.html#gae8911119d726a43b77f5781cb5a72813", null ],
+ [ "CLUTCHLOGD", "group___use_macros.html#ga369d365b7c25ec270596c3ca6839cf2c", null ],
[ "CLUTCHLOG", "group___use_macros.html#ga6f86187e2b35e7e1907d688f504a197d", null ],
[ "CLUTCHDUMP", "group___use_macros.html#ga572e3aa19d8b39e3ed0b9e91961104c2", null ],
[ "CLUTCHFUNC", "group___use_macros.html#ga9f77cee4f853e582262930c9c17f90ae", null ],
diff --git a/docs/clutchlog_8h__dep__incl.map b/docs/clutchlog_8h__dep__incl.map
index 20f2720..4740dc4 100644
--- a/docs/clutchlog_8h__dep__incl.map
+++ b/docs/clutchlog_8h__dep__incl.map
@@ -1,14 +1,15 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/docs/clutchlog_8h__dep__incl.md5 b/docs/clutchlog_8h__dep__incl.md5
index d28cb8a..440c2e6 100644
--- a/docs/clutchlog_8h__dep__incl.md5
+++ b/docs/clutchlog_8h__dep__incl.md5
@@ -1 +1 @@
-f0599479963670ec59fcd0540b0432ef
\ No newline at end of file
+03a5adb412c477109d73f308278ec653
\ No newline at end of file
diff --git a/docs/clutchlog_8h__dep__incl.svg b/docs/clutchlog_8h__dep__incl.svg
index 9fe6b9c..1422fbd 100644
--- a/docs/clutchlog_8h__dep__incl.svg
+++ b/docs/clutchlog_8h__dep__incl.svg
@@ -46,7 +46,7 @@ if (edges && edges.length) {
@@ -54,13 +54,13 @@ var sectionId = 'dynsection-1';
clutchlog.h
-
+
Node1
-
-clutchlog.h
+
+clutchlog.h
@@ -76,8 +76,8 @@ var sectionId = 'dynsection-1';
Node1->Node2
-
-
+
+
@@ -91,8 +91,8 @@ var sectionId = 'dynsection-1';
Node1->Node3
-
-
+
+
@@ -106,8 +106,8 @@ var sectionId = 'dynsection-1';
Node1->Node4
-
-
+
+
@@ -121,8 +121,8 @@ var sectionId = 'dynsection-1';
Node1->Node5
-
-
+
+
@@ -136,8 +136,8 @@ var sectionId = 'dynsection-1';
Node1->Node6
-
-
+
+
@@ -151,83 +151,98 @@ var sectionId = 'dynsection-1';
Node1->Node7
-
-
+
+
Node8
-
-
-t-dump.cpp
+
+
+t-depth-delta.cpp
Node1->Node8
-
-
+
+
Node9
-
-
-t-fmt-constructors.cpp
+
+
+t-dump.cpp
Node1->Node9
-
-
+
+
Node10
-
-
-t-hash-color.cpp
+
+
+t-fmt-constructors.cpp
Node1->Node10
-
-
+
+
Node11
-
-
-t-log.cpp
+
+
+t-hash-color.cpp
Node1->Node11
-
-
+
+
Node12
-
-
-t-one-line-if.cpp
+
+
+t-log.cpp
Node1->Node12
-
-
+
+
+
+
+
+Node13
+
+
+t-one-line-if.cpp
+
+
+
+
+
+Node1->Node13
+
+
diff --git a/docs/clutchlog_8h__dep__incl_org.svg b/docs/clutchlog_8h__dep__incl_org.svg
index df19fdd..3682d73 100644
--- a/docs/clutchlog_8h__dep__incl_org.svg
+++ b/docs/clutchlog_8h__dep__incl_org.svg
@@ -4,17 +4,17 @@
-
+
clutchlog.h
-
+
Node1
-
-clutchlog.h
+
+clutchlog.h
@@ -30,8 +30,8 @@
Node1->Node2
-
-
+
+
@@ -45,8 +45,8 @@
Node1->Node3
-
-
+
+
@@ -60,8 +60,8 @@
Node1->Node4
-
-
+
+
@@ -75,8 +75,8 @@
Node1->Node5
-
-
+
+
@@ -90,8 +90,8 @@
Node1->Node6
-
-
+
+
@@ -105,83 +105,98 @@
Node1->Node7
-
-
+
+
Node8
-
-
-t-dump.cpp
+
+
+t-depth-delta.cpp
Node1->Node8
-
-
+
+
Node9
-
-
-t-fmt-constructors.cpp
+
+
+t-dump.cpp
Node1->Node9
-
-
+
+
Node10
-
-
-t-hash-color.cpp
+
+
+t-fmt-constructors.cpp
Node1->Node10
-
-
+
+
Node11
-
-
-t-log.cpp
+
+
+t-hash-color.cpp
Node1->Node11
-
-
+
+
Node12
-
-
-t-one-line-if.cpp
+
+
+t-log.cpp
Node1->Node12
-
-
+
+
+
+
+
+Node13
+
+
+t-one-line-if.cpp
+
+
+
+
+
+Node1->Node13
+
+
diff --git a/docs/clutchlog_8h_source.html b/docs/clutchlog_8h_source.html
index fa6a0cb..71543c2 100644
--- a/docs/clutchlog_8h_source.html
+++ b/docs/clutchlog_8h_source.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -151,1352 +151,1369 @@ $(document).ready(function(){initNavTree('clutchlog_8h_source.html',''); initRes
76 #define CLUTCHLOC __FILE__, __FUNCTION__, __LINE__
- 81 #define CLUTCHLOG( LEVEL, WHAT ) do { \
- 82 auto& clutchlog__logger = clutchlog::logger(); \
- 83 std::ostringstream clutchlog__msg ; clutchlog__msg << WHAT; \
- 84 clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC); \
+ 81 #define CLUTCHLOGD( LEVEL, WHAT, DEPTH_DELTA ) do { \
+ 82 auto& clutchlog__logger = clutchlog::logger(); \
+ 83 std::ostringstream clutchlog__msg ; clutchlog__msg << WHAT; \
+ 84 clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC, DEPTH_DELTA); \
86 #else // not Debug build.
- 87 #define CLUTCHLOG( LEVEL, WHAT ) do { \
- 88 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
- 89 auto& clutchlog__logger = clutchlog::logger(); \
- 90 std::ostringstream clutchlog__msg ; clutchlog__msg << WHAT; \
- 91 clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC); \
-
+ 87 #define CLUTCHLOGD( LEVEL, WHAT, DEPTH_DELTA ) do { \
+ 88 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
+ 89 auto& clutchlog__logger = clutchlog::logger(); \
+ 90 std::ostringstream clutchlog__msg ; clutchlog__msg << WHAT; \
+ 91 clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC, DEPTH_DELTA); \
+
- 98 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { \
- 99 auto& clutchlog__logger = clutchlog::logger(); \
- 100 clutchlog__logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
- 101 CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
-
- 103 #else // not Debug build.
- 104 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { \
- 105 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
- 106 auto& clutchlog__logger = clutchlog::logger(); \
- 107 clutchlog__logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
- 108 CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
-
-
-
-
-
- 115 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { \
- 116 auto& clutchlog__logger = clutchlog::logger(); \
- 117 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
- 118 if(clutchlog__scope.matches) { \
-
-
-
- 122 #else // not Debug build.
- 123 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { \
- 124 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
- 125 auto& clutchlog__logger = clutchlog::logger(); \
- 126 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
- 127 if(clutchlog__scope.matches) { \
-
-
-
-
-
-
-
- 136 #define CLUTCHCODE( LEVEL, ... ) do { \
- 137 auto& clutchlog__logger = clutchlog::logger(); \
- 138 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
- 139 if(clutchlog__scope.matches) { \
-
-
-
- 143 #else // not Debug build.
- 144 #define CLUTCHCODE( LEVEL, CODE ) do { \
- 145 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
- 146 auto& clutchlog__logger = clutchlog::logger(); \
- 147 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
- 148 if(clutchlog__scope.matches) { \
-
-
-
-
-
-
- 157 #else // not WITH_CLUTCHLOG
-
- 159 #define CLUTCHLOG( LEVEL, WHAT ) do { } while(0)
- 160 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { } while(0)
- 161 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { } while(0)
- 162 #define CLUTCHCODE( LEVEL, CODE ) do { } while(0)
- 163 #endif // WITH_CLUTCHLOG
-
-
-
-
-
- 169 #ifdef WITH_CLUTCHLOG
-
-
-
-
+ 98 #define CLUTCHLOG( LEVEL, WHAT ) \
+ 99 CLUTCHLOGD(LEVEL, WHAT, 0)
+ 100 #else // not Debug build.
+ 101 #define CLUTCHLOG( LEVEL, WHAT ) \
+ 102 CLUTCHLOGD(LEVEL, WHAT, 0)
+
+
+
+ 107 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { \
+ 108 auto& clutchlog__logger = clutchlog::logger(); \
+ 109 clutchlog__logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
+ 110 CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
+
+ 112 #else // not Debug build.
+ 113 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { \
+ 114 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
+ 115 auto& clutchlog__logger = clutchlog::logger(); \
+ 116 clutchlog__logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
+ 117 CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
+
+
+
+
+
+ 124 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { \
+ 125 auto& clutchlog__logger = clutchlog::logger(); \
+ 126 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ 127 if(clutchlog__scope.matches) { \
+
+
+
+ 131 #else // not Debug build.
+ 132 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { \
+ 133 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
+ 134 auto& clutchlog__logger = clutchlog::logger(); \
+ 135 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ 136 if(clutchlog__scope.matches) { \
+
+
+
+
+
+
+
+ 145 #define CLUTCHCODE( LEVEL, ... ) do { \
+ 146 auto& clutchlog__logger = clutchlog::logger(); \
+ 147 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ 148 if(clutchlog__scope.matches) { \
+
+
+
+ 152 #else // not Debug build.
+ 153 #define CLUTCHCODE( LEVEL, CODE ) do { \
+ 154 if(clutchlog::level::LEVEL <= CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG) { \
+ 155 auto& clutchlog__logger = clutchlog::logger(); \
+ 156 clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ 157 if(clutchlog__scope.matches) { \
+
+
+
+
+
+
+ 166 #else // not WITH_CLUTCHLOG
+
+ 168 #define CLUTCHLOG( LEVEL, WHAT ) do { } while(0)
+ 169 #define CLUTCHLOGD( LEVEL, WHAT, DEPTH_DELTA ) do { } while(0)
+ 170 #define CLUTCHDUMP( LEVEL, CONTAINER, FILENAME ) do { } while(0)
+ 171 #define CLUTCHFUNC( LEVEL, FUNC, ... ) do { } while(0)
+ 172 #define CLUTCHCODE( LEVEL, CODE ) do { } while(0)
+ 173 #endif // WITH_CLUTCHLOG
+
+
+
+
+
+ 179 #ifdef WITH_CLUTCHLOG
-
- 186 #ifndef CLUTCHLOG_DEFAULT_FORMAT
- 187 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1 // Enables: name, depth and depth_marks
- 189 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1 // Enables: hfill
- 190 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func} @ {file}:{line}\n"
-
- 192 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
-
-
- 195 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
- 196 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg} {hfill} {func} @ {file}:{line}\n"
-
- 198 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
-
-
-
-
- 203 #ifndef CLUTCHLOG_DEFAULT_FORMAT
- 204 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 206 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func}\n"
-
- 208 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func}\n"
-
-
-
-
-
-
- 216 #ifndef CLUTCHDUMP_DEFAULT_FORMAT
- 217 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 219 #define CLUTCHDUMP_DEFAULT_FORMAT "# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}"
-
- 221 #define CLUTCHDUMP_DEFAULT_FORMAT "# {level} in {func} @ {file}:{line}"
-
- 223 #endif // CLUTCHDUMP_DEFAULT_FORMAT
-
- 225 #ifndef CLUTCHDUMP_DEFAULT_FORMAT
- 226 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 228 #define CLUTCHDUMP_DEFAULT_FORMAT "# [{name}] {level} in {func} (at depth {depth})"
-
- 230 #define CLUTCHDUMP_DEFAULT_FORMAT "# {level} in {func}"
-
- 232 #endif // CLUTCHDUMP_DEFAULT_FORMAT
-
-
-
- 237 #ifndef CLUTCHDUMP_DEFAULT_SEP
- 238 #define CLUTCHDUMP_DEFAULT_SEP "\n"
- 240 #endif // CLUTCHDUMP_DEFAULT_SEP
-
-
- 244 #ifndef CLUTCHLOG_DEFAULT_DEPTH_MARK
- 245 #define CLUTCHLOG_DEFAULT_DEPTH_MARK ">"
- 247 #endif // CLUTCHLOG_DEFAULT_DEPTH_MARK
-
-
- 251 #ifndef CLUTCHLOG_STRIP_CALLS
- 252 #define CLUTCHLOG_STRIP_CALLS 5
- 254 #endif // CLUTCHLOG_STRIP_CALLS
-
-
- 258 #ifndef CLUTCHLOG_DEFAULT_HFILL_MARK
- 259 #define CLUTCHLOG_DEFAULT_HFILL_MARK '.'
- 261 #endif // CLUTCHLOG_DEFAULT_HFILL_MARK
-
-
-
- 266 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
- 267 #ifndef CLUTCHLOG_DEFAULT_HFILL_MAX
- 268 #define CLUTCHLOG_DEFAULT_HFILL_MAX 300
-
- 270 #ifndef CLUTCHLOG_DEFAULT_HFILL_MIN
- 271 #define CLUTCHLOG_DEFAULT_HFILL_MIN 150
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 303 enum level {critical=0, error=1, warning=2, progress=3, note=4, info=5, debug=6, xdebug=7};
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 425 bright_magenta = 105,
-
-
-
-
-
-
- 433 friend std::ostream&
operator<< (std::ostream& os,
const std::tuple<fg,bg,typo>& fbs)
-
-
- 436 std::vector<short> codes; codes.reserve(3);
- 437 if (f != fg::none) { codes.push_back(
static_cast< short > (f));}
- 438 if (b != bg::none) { codes.push_back(
static_cast< short > (b));}
- 439 if (s != typo::none) { codes.push_back(
static_cast< short > (s));}
- 440 if (codes.size() == 0) {
-
-
-
-
-
- 446 for (
size_t i=1; i < codes.size(); ++i) {
- 447 os <<
";" << codes[i];
-
-
-
-
-
-
-
-
- 457 if (s != typo::none) {
- 458 os <<
"\033[" <<
static_cast< short > (s) <<
"m" ;
-
-
-
-
-
-
-
+
+
+
+
+
+ 196 #ifndef CLUTCHLOG_DEFAULT_FORMAT
+ 197 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1 // Enables: name, depth and depth_marks
+ 199 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1 // Enables: hfill
+ 200 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func} @ {file}:{line}\n"
+
+ 202 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
+
+
+ 205 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
+ 206 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg} {hfill} {func} @ {file}:{line}\n"
+
+ 208 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
+
+
+
+
+ 213 #ifndef CLUTCHLOG_DEFAULT_FORMAT
+ 214 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 216 #define CLUTCHLOG_DEFAULT_FORMAT "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func}\n"
+
+ 218 #define CLUTCHLOG_DEFAULT_FORMAT "{level_letter} {msg}\t\t\t\t\t{func}\n"
+
+
+
+
+
+
+ 226 #ifndef CLUTCHDUMP_DEFAULT_FORMAT
+ 227 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 229 #define CLUTCHDUMP_DEFAULT_FORMAT "# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}"
+
+ 231 #define CLUTCHDUMP_DEFAULT_FORMAT "# {level} in {func} @ {file}:{line}"
+
+ 233 #endif // CLUTCHDUMP_DEFAULT_FORMAT
+
+ 235 #ifndef CLUTCHDUMP_DEFAULT_FORMAT
+ 236 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 238 #define CLUTCHDUMP_DEFAULT_FORMAT "# [{name}] {level} in {func} (at depth {depth})"
+
+ 240 #define CLUTCHDUMP_DEFAULT_FORMAT "# {level} in {func}"
+
+ 242 #endif // CLUTCHDUMP_DEFAULT_FORMAT
+
+
+
+ 247 #ifndef CLUTCHDUMP_DEFAULT_SEP
+ 248 #define CLUTCHDUMP_DEFAULT_SEP "\n"
+ 250 #endif // CLUTCHDUMP_DEFAULT_SEP
+
+
+ 254 #ifndef CLUTCHLOG_DEFAULT_DEPTH_MARK
+ 255 #define CLUTCHLOG_DEFAULT_DEPTH_MARK ">"
+ 257 #endif // CLUTCHLOG_DEFAULT_DEPTH_MARK
+
+
+ 261 #ifndef CLUTCHLOG_STRIP_CALLS
+ 262 #define CLUTCHLOG_STRIP_CALLS 5
+ 264 #endif // CLUTCHLOG_STRIP_CALLS
+
+
+ 268 #ifndef CLUTCHLOG_DEFAULT_HFILL_MARK
+ 269 #define CLUTCHLOG_DEFAULT_HFILL_MARK '.'
+ 271 #endif // CLUTCHLOG_DEFAULT_HFILL_MARK
+
+
+
+ 276 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
+ 277 #ifndef CLUTCHLOG_DEFAULT_HFILL_MAX
+ 278 #define CLUTCHLOG_DEFAULT_HFILL_MAX 300
+
+ 280 #ifndef CLUTCHLOG_DEFAULT_HFILL_MIN
+ 281 #define CLUTCHLOG_DEFAULT_HFILL_MIN 150
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 313 enum level {critical=0, error=1, warning=2, progress=3, note=4, info=5, debug=6, xdebug=7};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 435 bright_magenta = 105,
+
+
+
+
+
+
+ 443 friend std::ostream&
operator<< (std::ostream& os,
const std::tuple<fg,bg,typo>& fbs)
+
+
+ 446 std::vector<short> codes; codes.reserve(3);
+ 447 if (f != fg::none) { codes.push_back(
static_cast< short > (f));}
+ 448 if (b != bg::none) { codes.push_back(
static_cast< short > (b));}
+ 449 if (s != typo::none) { codes.push_back(
static_cast< short > (s));}
+ 450 if (codes.size() == 0) {
+
+
+
+
+
+ 456 for (
size_t i=1; i < codes.size(); ++i) {
+ 457 os <<
";" << codes[i];
+
+
+
+
+
+
+
+
+ 467 if (s != typo::none) {
+ 468 os <<
"\033[" <<
static_cast< short > (s) <<
"m" ;
+
+
+
-
-
-
-
-
-
-
- 487 virtual bool is_set ()
const = 0;
+
+
+
+
+
+
+
+
- 490 virtual std::ostream&
print_on ( std::ostream& os)
const = 0;
-
-
-
-
- 496 os <<
"\033[" <<
static_cast< short > (c.
type ) <<
";" <<
static_cast< short > (c.mode) <<
";" ;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 497 virtual bool is_set ()
const = 0;
+
+ 500 virtual std::ostream&
print_on ( std::ostream& os)
const = 0;
+
+
+
+
+ 506 os <<
"\033[" <<
static_cast< short > (c.
type ) <<
";" <<
static_cast< short > (c.mode) <<
";" ;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
-
- 592 :
color (
ansi ::colors_16M, t),
red (r), green(g), blue(b) {}
+
+
+
+
+
+
+
+
+
+
-
-
- 603 assert(srgb.size() == 7);
- 604 if (srgb.size() != 7) {
-
-
-
-
-
- 610 if (srgb.at(0) ==
'#' ) {
-
-
- 613 std::istringstream(srgb.substr(0+i,2)) >> std::hex >>
red ;
- 614 std::istringstream(srgb.substr(2+i,2)) >> std::hex >> green;
- 615 std::istringstream(srgb.substr(4+i,2)) >> std::hex >> blue;
-
- 617 assert(-1 <=
red and
red <= 255);
- 618 assert(-1 <= green and green <= 255);
- 619 assert(-1 <= blue and blue <= 255);
-
-
- 623 bool is_set ()
const {
return red > -1 and green > -1 and blue > -1;}
-
-
-
- 628 os <<
red <<
";" << green <<
";" << blue;
-
+
+ 602 :
color (
ansi ::colors_16M, t),
red (r), green(g), blue(b) {}
+
+
+
+ 613 assert(srgb.size() == 7);
+ 614 if (srgb.size() != 7) {
+
+
+
+
+
+ 620 if (srgb.at(0) ==
'#' ) {
+
+
+ 623 std::istringstream(srgb.substr(0+i,2)) >> std::hex >>
red ;
+ 624 std::istringstream(srgb.substr(2+i,2)) >> std::hex >> green;
+ 625 std::istringstream(srgb.substr(4+i,2)) >> std::hex >> blue;
+
+ 627 assert(-1 <=
red and
red <= 255);
+ 628 assert(-1 <= green and green <= 255);
+ 629 assert(-1 <= blue and blue <= 255);
-
-
-
-
-
-
+
+ 633 bool is_set ()
const {
return red > -1 and green > -1 and blue > -1;}
+
+
+
+ 638 os <<
red <<
";" << green <<
";" << blue;
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 718 fmt (
const short fr,
const short fg ,
const short fb,
- 719 const short gr,
const short gg,
const short gb,
-
-
-
- 723 const short gr,
const short gg,
const short gb,
-
-
- 726 fmt (
const short fr,
const short fg ,
const short fb,
-
-
- 729 fmt (
const short fr,
const short fg ,
const short fb,
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 728 fmt (
const short fr,
const short fg ,
const short fb,
+ 729 const short gr,
const short gg,
const short gb,
-
-
- 733 fmt (
const std::string& f,
const std::string& b,
typo s = typo::none)
-
- 735 fmt (
fg ,
const std::string& b,
typo s = typo::none)
-
- 737 fmt (
const std::string& f,
bg ,
typo s = typo::none)
-
- 739 fmt (
const std::string& f,
typo s = typo::none)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ 733 const short gr,
const short gg,
const short gb,
+
+
+ 736 fmt (
const short fr,
const short fg ,
const short fb,
+
+
+ 739 fmt (
const short fr,
const short fg ,
const short fb,
+
+
+
+ 743 fmt (
const std::string& f,
const std::string& b,
typo s = typo::none)
+
+ 745 fmt (
fg ,
const std::string& b,
typo s = typo::none)
+
+ 747 fmt (
const std::string& f,
bg ,
typo s = typo::none)
+
+ 749 fmt (
const std::string& f,
typo s = typo::none)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- 797 std::ostringstream os;
-
- 799 fmt reset(fmt::typo::reset);
-
-
-
-
-
-
-
- 809 std::ostringstream os;
-
-
-
-
- 814 static fmt hash(
const std::string&
str ,
const std::vector<fmt> domain = {})
-
- 816 size_t h = std::hash<std::string>{}(
str );
- 817 if (domain.size() == 0) {
- 818 return fmt (
static_cast< short > (h % 256));
-
- 820 return fmt (domain[h % domain.size()]);
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 807 std::ostringstream os;
+
+ 809 fmt reset(fmt::typo::reset);
+
+
+
+
+
+
+
+ 819 std::ostringstream os;
+
+
-
-
-
-
- 832 void operator=(
clutchlog const &) =
delete ;
-
-
-
-
-
-
- 839 {level::critical,
"Critical" },
- 840 {level::error ,
"Error" },
- 841 {level::warning ,
"Warning" },
- 842 {level::progress,
"Progress" },
- 843 {level::note ,
"Note" },
- 844 {level::info ,
"Info" },
- 845 {level::debug ,
"Debug" },
- 846 {level::xdebug ,
"XDebug" }
-
-
- 849 {level::critical,
"Crit" },
- 850 {level::error ,
"Erro" },
- 851 {level::warning ,
"Warn" },
- 852 {level::progress,
"Prog" },
- 853 {level::note ,
"Note" },
- 854 {level::info ,
"Info" },
- 855 {level::debug ,
"Dbug" },
- 856 {level::xdebug ,
"XDbg" }
+
+ 824 static fmt hash(
const std::string&
str ,
const std::vector<fmt> domain = {})
+
+ 826 size_t h = std::hash<std::string>{}(
str );
+ 827 if (domain.size() == 0) {
+ 828 return fmt (
static_cast< short > (h % 256));
+
+ 830 return fmt (domain[h % domain.size()]);
+
+
+
+
+
+
+ 842 void operator=(
clutchlog const &) =
delete ;
+
+
+
+
+
+
+ 849 {level::critical,
"Critical" },
+ 850 {level::error ,
"Error" },
+ 851 {level::warning ,
"Warning" },
+ 852 {level::progress,
"Progress" },
+ 853 {level::note ,
"Note" },
+ 854 {level::info ,
"Info" },
+ 855 {level::debug ,
"Debug" },
+ 856 {level::xdebug ,
"XDebug" }
-
- 859 {level::critical,fmt(fmt::fg::red, fmt::typo::underline)},
- 860 {level::error ,fmt(fmt::fg::red, fmt::typo::bold)},
- 861 {level::warning ,fmt(fmt::fg::magenta, fmt::typo::bold)},
- 862 {level::progress,fmt()},
- 863 {level::note ,fmt()},
- 864 {level::info ,fmt()},
- 865 {level::debug ,fmt()},
- 866 {level::xdebug ,fmt()}
+
+ 859 {level::critical,
"Crit" },
+ 860 {level::error ,
"Erro" },
+ 861 {level::warning ,
"Warn" },
+ 862 {level::progress,
"Prog" },
+ 863 {level::note ,
"Note" },
+ 864 {level::info ,
"Info" },
+ 865 {level::debug ,
"Dbug" },
+ 866 {level::xdebug ,
"XDbg" }
-
-
- 870 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
-
- 872 _hfill_fmt(fmt::fg::none),
-
-
-
-
- 877 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 878 _depth(std::numeric_limits<size_t>::max() -
_strip_calls ),
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 894 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
-
- 896 ioctl(STDERR_FILENO, TIOCGWINSZ, &w);
-
-
-
-
-
-
-
-
-
-
-
-
- 916 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
-
-
-
-
-
-
-
-
- 928 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
- 932 std::string _depth_mark;
-
-
-
-
-
-
-
-
-
-
- 948 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
- 950 static const size_t _max_buffer = 4096;
- 952 std::vector<fmt> _depth_fmts;
-
-
- 955 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
-
-
-
+
+ 869 {level::critical,fmt(fmt::fg::red, fmt::typo::underline)},
+ 870 {level::error ,fmt(fmt::fg::red, fmt::typo::bold)},
+ 871 {level::warning ,fmt(fmt::fg::magenta, fmt::typo::bold)},
+ 872 {level::progress,fmt()},
+ 873 {level::note ,fmt()},
+ 874 {level::info ,fmt()},
+ 875 {level::debug ,fmt()},
+ 876 {level::xdebug ,fmt()}
+
+
+
+ 880 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
+
+ 882 _hfill_fmt(fmt::fg::none),
+
+
+
+
+ 887 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 888 _depth(std::numeric_limits<size_t>::max() -
_strip_calls ),
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 904 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
+
+ 906 ioctl(STDERR_FILENO, TIOCGWINSZ, &w);
+
+
+
+
+
+
+
+
+
+
+
+
+ 926 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
+
+
+
+
+
+
+
+
+ 938 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+
+ 942 std::string _depth_mark;
+
+
+
+
+
+
+
+
+
+
+ 958 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
-
-
-
-
-
-
-
-
+ 960 static const size_t _max_buffer = 4096;
+ 962 std::vector<fmt> _depth_fmts;
+
+
+ 965 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
+
+
+
+
+
+
+
+
- 981 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 982 void depth(
size_t d) {_depth = d;}
- 985 size_t depth()
const {
return _depth;}
-
- 988 void depth_mark(
const std::string mark) {_depth_mark = mark;}
- 990 std::string depth_mark()
const {
return _depth_mark;}
-
-
-
-
- 997 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
- 998 void hfill_mark(
const char mark) {_hfill_char = mark;}
- 1001 char hfill_mark()
const {
return _hfill_char;}
- 1003 void hfill_style(fmt
style ) {_hfill_fmt =
style ;}
- 1008 template <
class ... FMT>
- 1009 void hfill_style(FMT... styles) { this->hfill_style(fmt(styles...)); }
- 1011 fmt hfill_style()
const {
return _hfill_fmt;}
- 1013 void hfill_max(
const size_t nmax) {_hfill_max = nmax;}
- 1015 size_t hfill_max() {
return _hfill_max;}
- 1017 void hfill_min(
const size_t nmin) {_hfill_min = nmin;}
- 1019 size_t hfill_min() {
return _hfill_min;}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1064 return ilevel->second;
-
- 1066 throw std::out_of_range(
"'" + name +
"' is not a valid log level name" );
-
-
-
-
-
-
-
-
- 1079 const std::string& in_file,
- 1080 const std::string& in_function=
".*" ,
- 1081 const std::string& in_line=
".*"
-
-
-
-
-
-
-
- 1093 template <
class ... FMT>
-
-
-
-
-
-
-
-
-
- 1113 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1134 const std::string&
file ,
- 1135 const std::string&
func ,
-
-
-
-
+
+
+
+
+
+
+ 991 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 992 void depth(
size_t d) {_depth = d;}
+ 995 size_t depth()
const {
return _depth;}
+
+ 998 void depth_mark(
const std::string mark) {_depth_mark = mark;}
+ 1000 std::string depth_mark()
const {
return _depth_mark;}
+
+
+
+
+ 1007 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
+ 1008 void hfill_mark(
const char mark) {_hfill_char = mark;}
+ 1011 char hfill_mark()
const {
return _hfill_char;}
+ 1013 void hfill_style(fmt
style ) {_hfill_fmt =
style ;}
+ 1018 template <
class ... FMT>
+ 1019 void hfill_style(FMT... styles) { this->hfill_style(fmt(styles...)); }
+ 1021 fmt hfill_style()
const {
return _hfill_fmt;}
+ 1023 void hfill_max(
const size_t nmax) {_hfill_max = nmax;}
+ 1025 size_t hfill_max() {
return _hfill_max;}
+ 1027 void hfill_min(
const size_t nmin) {_hfill_min = nmin;}
+ 1029 size_t hfill_min() {
return _hfill_min;}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1074 return ilevel->second;
+
+ 1076 throw std::out_of_range(
"'" + name +
"' is not a valid log level name" );
+
+
+
+
+
+
+
+
+ 1089 const std::string& in_file,
+ 1090 const std::string& in_function=
".*" ,
+ 1091 const std::string& in_line=
".*"
+
+
+
+
+
+
+
+ 1103 template <
class ... FMT>
+
+
+
+
+
+
+
+
+
+ 1123 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- 1143 scope.stage = stage;
- 1144 if (not (scope.stage <=
_stage )) {
-
-
-
-
- 1149 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
-
- 1153 void *buffer[_max_buffer];
- 1154 stack_depth = backtrace(buffer, _max_buffer);
- 1155 scope.depth = stack_depth;
-
-
-
-
-
-
-
-
- 1164 std::ostringstream sline; sline <<
line ;
-
-
-
- 1168 and std::regex_search(sline.str(),
_in_line );
-
-
- 1171 scope.matches = scope.there;
-
-
-
-
-
- 1184 const std::string& form,
- 1185 const std::string& mark,
- 1186 const std::string& tag
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1243 const std::regex re(mark);
- 1244 return std::regex_replace(form, re, tag);
-
-
-
- 1249 const std::string& form,
- 1250 const std::string& mark,
-
-
-
- 1254 std::ostringstream stag; stag << tag;
- 1255 return replace (form, mark, stag.str());
-
-
-
-
- 1261 const std::string& what,
-
- 1263 const std::string& name,
-
-
- 1266 const std::string&
file ,
- 1267 const std::string&
func ,
-
-
-
-
-
-
-
- 1275 row =
replace (row,
"\\{msg\\}" , what);
-
-
-
-
-
- 1281 std::string letter(1,
_level_word .at(stage).at(0));
- 1282 row =
replace (row,
"\\{level_letter\\}" , letter);
-
-
-
- 1286 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
- 1288 row =
replace (row,
"\\{name\\}" , name);
- 1289 row =
replace (row,
"\\{depth\\}" , actual_depth);
-
- 1291 std::ostringstream chevrons;
-
- 1293 chevrons << _depth_mark;
-
- 1295 row =
replace (row,
"\\{depth_marks\\}" , chevrons.str());
-
- 1297 if (_depth_fmts.size() == 0) {
- 1298 row =
replace (row,
"\\{depth_fmt\\}" ,
fmt (actual_depth % 256).str() );
-
- 1300 row =
replace (row,
"\\{depth_fmt\\}" ,
- 1301 _depth_fmts[std::min(actual_depth,_depth_fmts.size()-1)].str() );
-
-
-
-
-
-
- 1308 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
-
- 1310 const std::string raw_row =
replace (row,
"\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]" ,
"" );
- 1311 const std::string hfill_tag =
"{hfill}" ;
- 1312 const size_t hfill_pos = row.find(hfill_tag);
- 1313 const size_t raw_hfill_pos = raw_row.find(hfill_tag);
- 1314 const size_t nb_columns = std::max(std::min((
size_t )_nb_columns, _hfill_max), _hfill_min);
- 1315 if (hfill_pos != std::string::npos) {
- 1316 assert(raw_hfill_pos != std::string::npos);
- 1317 if (nb_columns > 0) {
- 1318 const size_t left_len = raw_hfill_pos;
- 1319 const size_t right_len = raw_row.size() - raw_hfill_pos - hfill_tag.size();
- 1320 if (right_len+left_len > nb_columns) {
-
- 1322 if (right_len < nb_columns) {
-
- 1324 const std::string hfill(std::max((
size_t )0, nb_columns-right_len), _hfill_char);
- 1325 const std::string hfill_styled = _hfill_fmt(hfill);
- 1326 row =
replace (row,
"\\{hfill\\}" ,
"\n" +hfill_styled);
-
-
- 1329 const std::string hfill(1, _hfill_char);
- 1330 const std::string hfill_styled = _hfill_fmt(hfill);
- 1331 row =
replace (row,
"\\{hfill\\}" ,
"\n" +hfill_styled);
-
-
-
- 1335 const std::string hfill(std::max((
size_t )0, nb_columns - (right_len+left_len)), _hfill_char);
- 1336 const std::string hfill_styled = _hfill_fmt(hfill);
- 1337 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
-
-
-
- 1341 const std::string hfill(1, _hfill_char);
- 1342 const std::string hfill_styled = _hfill_fmt(hfill);
- 1343 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
-
-
-
-
- 1348 const std::string hfill(1, _hfill_char);
- 1349 const std::string hfill_styled = _hfill_fmt(hfill);
- 1350 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
-
-
-
-
-
-
- 1358 const std::string& what,
- 1359 const std::string&
file ,
const std::string&
func ,
size_t line
-
-
-
-
-
- 1365 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
- 1368 line , scope.depth );
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1383 const In container_begin,
const In container_end,
- 1384 const std::string&
file ,
const std::string&
func ,
size_t line ,
- 1385 const std::string& filename_template =
"dump_{n}.dat" ,
-
-
-
-
-
-
- 1392 const std::string tag =
"\\{n\\}" ;
- 1393 const std::regex re(tag);
- 1394 std::string outfile =
"" ;
-
-
- 1397 if (std::regex_search(filename_template, re)) {
-
-
-
- 1401 outfile =
replace (filename_template, tag, n);
-
- 1403 }
while ( fs::exists( outfile ) );
-
-
-
- 1407 outfile = filename_template;
-
-
- 1410 std::ofstream fd(outfile);
-
-
- 1413 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
-
-
- 1416 line , scope.depth );
-
-
-
-
-
-
-
-
- 1425 std::copy(container_begin, container_end,
- 1426 std::ostream_iterator<typename In::value_type>(fd, sep.c_str()));
+
+
+ 1144 const std::string&
file ,
+ 1145 const std::string&
func ,
+
+
+
+
+
+
+
+ 1153 scope.stage = stage;
+ 1154 if (not (scope.stage <=
_stage )) {
+
+
+
+
+ 1159 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+
+
+ 1163 void *buffer[_max_buffer];
+ 1164 stack_depth = backtrace(buffer, _max_buffer);
+ 1165 scope.depth = stack_depth;
+
+
+
+
+
+
+
+
+ 1174 std::ostringstream sline; sline <<
line ;
+
+
+
+ 1178 and std::regex_search(sline.str(),
_in_line );
+
+
+ 1181 scope.matches = scope.there;
+
+
+
+
+
+ 1194 const std::string& form,
+ 1195 const std::string& mark,
+ 1196 const std::string& tag
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1253 const std::regex re(mark);
+ 1254 return std::regex_replace(form, re, tag);
+
+
+
+ 1259 const std::string& form,
+ 1260 const std::string& mark,
+
+
+
+ 1264 std::ostringstream stag; stag << tag;
+ 1265 return replace (form, mark, stag.str());
+
+
+
+
+ 1271 const std::string& what,
+
+ 1273 const std::string& name,
+
+
+ 1276 const std::string&
file ,
+ 1277 const std::string&
func ,
+
+
+
+
+
+
+
+ 1285 row =
replace (row,
"\\{msg\\}" , what);
+
+
+
+
+
+ 1291 std::string letter(1,
_level_word .at(stage).at(0));
+ 1292 row =
replace (row,
"\\{level_letter\\}" , letter);
+
+
+
+ 1296 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+ 1298 row =
replace (row,
"\\{name\\}" , name);
+ 1299 row =
replace (row,
"\\{depth\\}" , actual_depth);
+
+ 1301 if (_depth_fmts.size() == 0) {
+ 1302 row =
replace (row,
"\\{depth_fmt\\}" ,
fmt (actual_depth % 256).str() );
+
+ 1304 std::ostringstream chevrons;
+ 1305 for (
size_t i = 0; i < actual_depth; ++i) {
+ 1306 chevrons << _depth_mark;
+
+ 1308 row =
replace (row,
"\\{depth_marks\\}" , chevrons.str());
+
+
+ 1311 row =
replace (row,
"\\{depth_fmt\\}" ,
+ 1312 _depth_fmts[std::min(actual_depth,_depth_fmts.size()-1)].str() );
+
+ 1314 std::ostringstream chevrons;
+ 1315 for (
size_t i = 0; i < actual_depth; ++i) {
+ 1316 chevrons << _depth_fmts[std::min(i+1,_depth_fmts.size()-1)].str()
+
+
+ 1319 row =
replace (row,
"\\{depth_marks\\}" , chevrons.str());
+
+
+
+
+
+
+ 1326 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
+
+ 1328 const std::string raw_row =
replace (row,
"\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]" ,
"" );
+ 1329 const std::string hfill_tag =
"{hfill}" ;
+ 1330 const size_t hfill_pos = row.find(hfill_tag);
+ 1331 const size_t raw_hfill_pos = raw_row.find(hfill_tag);
+ 1332 const size_t nb_columns = std::max(std::min((
size_t )_nb_columns, _hfill_max), _hfill_min);
+ 1333 if (hfill_pos != std::string::npos) {
+ 1334 assert(raw_hfill_pos != std::string::npos);
+ 1335 if (nb_columns > 0) {
+ 1336 const size_t left_len = raw_hfill_pos;
+ 1337 const size_t right_len = raw_row.size() - raw_hfill_pos - hfill_tag.size();
+ 1338 if (right_len+left_len > nb_columns) {
+
+ 1340 if (right_len < nb_columns) {
+
+ 1342 const std::string hfill(std::max((
size_t )0, nb_columns-right_len), _hfill_char);
+ 1343 const std::string hfill_styled = _hfill_fmt(hfill);
+ 1344 row =
replace (row,
"\\{hfill\\}" ,
"\n" +hfill_styled);
+
+
+ 1347 const std::string hfill(1, _hfill_char);
+ 1348 const std::string hfill_styled = _hfill_fmt(hfill);
+ 1349 row =
replace (row,
"\\{hfill\\}" ,
"\n" +hfill_styled);
+
+
+
+ 1353 const std::string hfill(std::max((
size_t )0, nb_columns - (right_len+left_len)), _hfill_char);
+ 1354 const std::string hfill_styled = _hfill_fmt(hfill);
+ 1355 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
+
+
+
+ 1359 const std::string hfill(1, _hfill_char);
+ 1360 const std::string hfill_styled = _hfill_fmt(hfill);
+ 1361 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
+
+
+
+
+ 1366 const std::string hfill(1, _hfill_char);
+ 1367 const std::string hfill_styled = _hfill_fmt(hfill);
+ 1368 row =
replace (row,
"\\{hfill\\}" , hfill_styled);
+
+
+
+
+
+
+ 1376 const std::string& what,
+ 1377 const std::string&
file ,
const std::string&
func ,
const size_t line ,
+ 1378 const size_t depth_delta = 0
+
+
+
+
+
+ 1384 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+
+ 1387 line , scope.depth + depth_delta );
+
+
+
+
+
+
+
+
+
+
+
+
+ 1401 const In container_begin,
const In container_end,
+ 1402 const std::string&
file ,
const std::string&
func ,
const size_t line ,
+ 1403 const std::string& filename_template =
"dump_{n}.dat" ,
+
+
+
+
+
+
+ 1410 const std::string tag =
"\\{n\\}" ;
+ 1411 const std::regex re(tag);
+ 1412 std::string outfile =
"" ;
+
+
+ 1415 if (std::regex_search(filename_template, re)) {
+
+
+
+ 1419 outfile =
replace (filename_template, tag, n);
+
+ 1421 }
while ( fs::exists( outfile ) );
+
+
+
+ 1425 outfile = filename_template;
+
-
-
-
-
-
-
- 1437 #else // not WITH_CLUTCHLOG
-
-
-
-
-
-
-
-
- 1446 #pragma GCC diagnostic push
- 1447 #pragma GCC diagnostic ignored "-Wreturn-type"
-
-
-
-
- 1452 enum level {critical=0, error=1, warning=2, progress=3, note=4, info=5, debug=6, xdebug=7};
-
-
-
- 1456 enum class typo { reset, bold, underline, inverse, none}
style ;
- 1457 enum class fg { black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, bright_white, none}
fore ;
- 1458 enum class bg { black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, bright_white, none }
back ;
-
- 1460 friend std::ostream&
operator<< (std::ostream&,
const std::tuple<fg,bg,typo>&) {}
-
-
-
-
-
-
- 1467 virtual bool is_set ()
const = 0;
- 1468 virtual std::ostream&
print_on ( std::ostream&)
const = 0;
-
-
- 1471 struct color_256 :
public color {
-
-
-
-
- 1476 std::ostream&
print_on ( std::ostream&)
const {}
-
- 1478 struct fg_256 :
public color_256 {
-
-
-
-
- 1483 struct bg_256 :
public color_256 {
-
-
-
-
- 1488 struct color_16M :
public color {
- 1489 short red , green, blue;
-
-
-
- 1493 bool is_set ()
const {
return red > -1 and green > -1 and blue > -1;}
- 1494 std::ostream&
print_on ( std::ostream&)
const {}
+ 1428 std::ofstream fd(outfile);
+
+
+ 1431 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+
+
+ 1434 line , scope.depth );
+
+
+
+
+
+
+
+
+ 1443 std::copy(container_begin, container_end,
+ 1444 std::ostream_iterator<typename In::value_type>(fd, sep.c_str()));
+
+
+
+
+
+
+
+ 1455 #else // not WITH_CLUTCHLOG
+
+
+
+
+
+
+
+
+ 1464 #pragma GCC diagnostic push
+ 1465 #pragma GCC diagnostic ignored "-Wreturn-type"
+
+
+
+
+ 1470 enum level {critical=0, error=1, warning=2, progress=3, note=4, info=5, debug=6, xdebug=7};
+
+
+
+ 1474 enum class typo { reset, bold, underline, inverse, none}
style ;
+ 1475 enum class fg { black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, bright_white, none}
fore ;
+ 1476 enum class bg { black, red, green, yellow, blue, magenta, cyan, white, bright_black, bright_red, bright_green, bright_yellow, bright_blue, bright_magenta, bright_cyan, bright_white, none }
back ;
+
+ 1478 friend std::ostream&
operator<< (std::ostream&,
const std::tuple<fg,bg,typo>&) {}
+
+
+
+
+
+
+ 1485 virtual bool is_set ()
const = 0;
+ 1486 virtual std::ostream&
print_on ( std::ostream&)
const = 0;
+
+
+ 1489 struct color_256 :
public color {
+
+
+
+
+ 1494 std::ostream&
print_on ( std::ostream&)
const {}
- 1496 struct fg_16M :
public color_16M {
-
-
-
-
-
- 1502 struct bg_16M :
public color_16M {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1519 fmt (
const short fr,
const short fg ,
const short fb,
- 1520 const short gr,
const short gg,
const short gb,
- 1521 typo s = typo::none)
-
-
- 1524 const short gr,
const short gg,
const short gb,
- 1525 typo s = typo::none)
-
- 1527 fmt (
const short fr,
const short fg ,
const short fb,
-
-
- 1530 fmt (
const short fr,
const short fg ,
const short fb,
- 1531 typo s = typo::none)
-
-
- 1534 fmt (
const std::string& f,
const std::string& b,
typo s = typo::none)
-
- 1536 fmt (
fg ,
const std::string& b,
typo s = typo::none)
-
- 1538 fmt (
const std::string& f,
bg ,
typo s = typo::none)
-
- 1540 fmt (
const std::string& f,
typo s = typo::none)
-
-
- 1543 std::ostream&
print_on ( std::ostream&)
const {}
-
- 1545 friend std::ostream&
operator<< (std::ostream&,
const fmt &) {}
- 1546 std::string
operator() (
const std::string&)
const {}
- 1547 std::string
str ()
const {}
- 1548 static fmt hash(
const std::string&,
const std::vector<fmt>) {}
-
-
-
- 1552 void operator=(
clutchlog const &) =
delete ;
-
-
-
-
-
-
-
-
-
-
-
-
- 1565 void format (
const std::string&) {}
- 1566 std::string
format ()
const {}
-
-
-
-
- 1571 void out (std::ostream&) {}
- 1572 std::ostream&
out () {}
-
- 1574 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
- 1575 void depth(
size_t ) {}
- 1576 size_t depth()
const {}
-
- 1578 void depth_mark(
const std::string) {}
- 1579 std::string depth_mark()
const {}
- 1580 void strip_calls(
const size_t ) {}
- 1581 size_t strip_calls()
const {}
-
- 1583 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
- 1584 void hfill_mark(
const char ) {}
- 1585 char hfill_mark()
const {}
- 1586 void hfill_fmt(fmt) {}
- 1587 fmt hfill_fmt()
const {}
- 1588 void hfill_min(
const size_t ) {}
- 1589 size_t hfill_min() {}
- 1590 void hfill_max(
const size_t ) {}
- 1591 size_t hfill_max() {}
-
-
-
-
-
-
-
-
- 1600 const std::map<std::string,level>
levels ()
const {}
-
-
- 1603 void file (std::string) {}
- 1604 void func (std::string) {}
- 1605 void line (std::string) {}
-
- 1607 #pragma GCC diagnostic push
- 1608 #pragma GCC diagnostic ignored "-Wunused-parameter"
-
-
- 1611 const std::string& in_function=
".*" ,
- 1612 const std::string& in_line=
".*"
-
-
- 1615 #pragma GCC diagnostic pop
- 1616 template <
class ... FMT>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1655 const std::string&,
const std::string&,
size_t
-
-
-
-
-
-
-
- 1663 const std::string&,
const std::string&,
size_t ,
-
-
-
-
-
- 1669 #pragma GCC diagnostic pop
- 1670 #endif // WITH_CLUTCHLOG
-
- 1672 #endif // CLUTCHLOG_H
+ 1496 struct fg_256 :
public color_256 {
+
+
+
+
+ 1501 struct bg_256 :
public color_256 {
+
+
+
+
+ 1506 struct color_16M :
public color {
+ 1507 short red , green, blue;
+
+
+
+ 1511 bool is_set ()
const {
return red > -1 and green > -1 and blue > -1;}
+ 1512 std::ostream&
print_on ( std::ostream&)
const {}
+
+ 1514 struct fg_16M :
public color_16M {
+
+
+
+
+
+ 1520 struct bg_16M :
public color_16M {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1537 fmt (
const short fr,
const short fg ,
const short fb,
+ 1538 const short gr,
const short gg,
const short gb,
+ 1539 typo s = typo::none)
+
+
+ 1542 const short gr,
const short gg,
const short gb,
+ 1543 typo s = typo::none)
+
+ 1545 fmt (
const short fr,
const short fg ,
const short fb,
+
+
+ 1548 fmt (
const short fr,
const short fg ,
const short fb,
+ 1549 typo s = typo::none)
+
+
+ 1552 fmt (
const std::string& f,
const std::string& b,
typo s = typo::none)
+
+ 1554 fmt (
fg ,
const std::string& b,
typo s = typo::none)
+
+ 1556 fmt (
const std::string& f,
bg ,
typo s = typo::none)
+
+ 1558 fmt (
const std::string& f,
typo s = typo::none)
+
+
+ 1561 std::ostream&
print_on ( std::ostream&)
const {}
+
+ 1563 friend std::ostream&
operator<< (std::ostream&,
const fmt &) {}
+ 1564 std::string
operator() (
const std::string&)
const {}
+ 1565 std::string
str ()
const {}
+ 1566 static fmt hash(
const std::string&,
const std::vector<fmt>) {}
+
+
+
+ 1570 void operator=(
clutchlog const &) =
delete ;
+
+
+
+
+
+
+
+
+
+
+
+
+ 1583 void format (
const std::string&) {}
+ 1584 std::string
format ()
const {}
+
+
+
+
+ 1589 void out (std::ostream&) {}
+ 1590 std::ostream&
out () {}
+
+ 1592 #if CLUTCHLOG_HAVE_UNIX_SYSINFO == 1
+ 1593 void depth(
size_t ) {}
+ 1594 size_t depth()
const {}
+
+ 1596 void depth_mark(
const std::string) {}
+ 1597 std::string depth_mark()
const {}
+ 1598 void strip_calls(
const size_t ) {}
+ 1599 size_t strip_calls()
const {}
+
+ 1601 #if CLUTCHLOG_HAVE_UNIX_SYSIOCTL == 1
+ 1602 void hfill_mark(
const char ) {}
+ 1603 char hfill_mark()
const {}
+ 1604 void hfill_fmt(fmt) {}
+ 1605 fmt hfill_fmt()
const {}
+ 1606 void hfill_min(
const size_t ) {}
+ 1607 size_t hfill_min() {}
+ 1608 void hfill_max(
const size_t ) {}
+ 1609 size_t hfill_max() {}
+
+
+
+
+
+
+
+
+ 1618 const std::map<std::string,level>
levels ()
const {}
+
+
+ 1621 void file (std::string) {}
+ 1622 void func (std::string) {}
+ 1623 void line (std::string) {}
+
+ 1625 #pragma GCC diagnostic push
+ 1626 #pragma GCC diagnostic ignored "-Wunused-parameter"
+
+
+ 1629 const std::string& in_function=
".*" ,
+ 1630 const std::string& in_line=
".*"
+
+
+ 1633 #pragma GCC diagnostic pop
+ 1634 template <
class ... FMT>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1673 const std::string&,
const std::string&,
size_t
+
+
+
+
+
+
+
+ 1681 const std::string&,
const std::string&,
size_t ,
+
+
+
+
+
+ 1687 #pragma GCC diagnostic pop
+ 1688 #endif // WITH_CLUTCHLOG
+
+ 1690 #endif // CLUTCHLOG_H
-friend std::ostream & operator<<(std::ostream &os, const std::tuple< fg, bg, typo > &fbs)
Output stream operator for a 3-tuple of 16-colors mode tags.
-static std::string default_depth_mark
Default mark for stack depth.
-std::string _format_log
Current format of the standard output.
-color_16M(ground t, const std::string &srgb)
Hex triplet string constructor.
-void depth_styles(std::vector< fmt > styles)
Set the styles for value-dependant depth formatting.
-std::map< level, fmt > _level_fmt
Dictionary of level identifier to their format.
-void log(const level &stage, const std::string &what, const std::string &file, const std::string &func, size_t line) const
Print a log message IF the location matches the given one.
+friend std::ostream & operator<<(std::ostream &os, const std::tuple< fg, bg, typo > &fbs)
Output stream operator for a 3-tuple of 16-colors mode tags.
+static std::string default_depth_mark
Default mark for stack depth.
+std::string _format_log
Current format of the standard output.
+color_16M(ground t, const std::string &srgb)
Hex triplet string constructor.
+void dump(const level &stage, const In container_begin, const In container_end, const std::string &file, const std::string &func, const size_t line, const std::string &filename_template="dump_{n}.dat", const std::string sep=dump_default_sep) const
Dump a serializable container after a comment line with log information.
+void depth_styles(std::vector< fmt > styles)
Set the styles for value-dependant depth formatting.
+std::map< level, fmt > _level_fmt
Dictionary of level identifier to their format.
enum clutchlog::fmt::bg back
Background color.
-std::vector< fmt > _funchash_fmts
List of candidate format objects for value-dependant function name styling.
-std::string str() const
Return the formatting code as a string.
-Foreground in 256-colors mode.
-void line(std::string line)
Set the regular expression filtering the line location.
-friend std::ostream & operator<<(std::ostream &os, const color &c)
Print the actually encoded escaped color sequence on the given stream.
-friend std::ostream & operator<<(std::ostream &os, const typo &s)
Output stream operator for a typo tag alone, in 16-colors mode.
-static std::string dump_default_format
Default format of the comment line in file dump.
-void out(std::ostream &out)
Set the output stream on which to print.
-bool is_set() const
Returns true if the underying representation encodes an existing color.
-fg_16M(const fg &)
Conversion constructor from 16-colors mode.
-static std::string dump_default_sep
Default item separator for dump.
-std::string format(std::string row, const std::string &what, const level &stage, const std::string &file, const std::string &func, const size_t line) const
Substitute all tags in the format string with the corresponding information and apply the style corre...
-Background in 256-colors mode.
-#define CLUTCHLOG_DEFAULT_DEPTH_MARK
Compile-time default mark for stack depth.
-static unsigned int default_strip_calls
Number of call stack levels to remove from depth display by default.
-static size_t default_hfill_min
Default minimum width (number of characters) at which to fill for right-aligning the right part of me...
-std::string replace(const std::string &form, const std::string &mark, const std::string &tag) const
Replace mark by tag in form.
-color_256(ground t)
Constructor.
+std::vector< fmt > _funchash_fmts
List of candidate format objects for value-dependant function name styling.
+std::string str() const
Return the formatting code as a string.
+Foreground in 256-colors mode.
+void line(std::string line)
Set the regular expression filtering the line location.
+friend std::ostream & operator<<(std::ostream &os, const color &c)
Print the actually encoded escaped color sequence on the given stream.
+friend std::ostream & operator<<(std::ostream &os, const typo &s)
Output stream operator for a typo tag alone, in 16-colors mode.
+static std::string dump_default_format
Default format of the comment line in file dump.
+void out(std::ostream &out)
Set the output stream on which to print.
+bool is_set() const
Returns true if the underying representation encodes an existing color.
+fg_16M(const fg &)
Conversion constructor from 16-colors mode.
+static std::string dump_default_sep
Default item separator for dump.
+std::string format(std::string row, const std::string &what, const level &stage, const std::string &file, const std::string &func, const size_t line) const
Substitute all tags in the format string with the corresponding information and apply the style corre...
+Background in 256-colors mode.
+#define CLUTCHLOG_DEFAULT_DEPTH_MARK
Compile-time default mark for stack depth.
+static unsigned int default_strip_calls
Number of call stack levels to remove from depth display by default.
+static size_t default_hfill_min
Default minimum width (number of characters) at which to fill for right-aligning the right part of me...
+std::string replace(const std::string &form, const std::string &mark, const std::string &tag) const
Replace mark by tag in form.
+color_256(ground t)
Constructor.
clutchlog::fmt::bg_16M back_16M
Current background in 16M-colors mode.
-Interface class for colors representation.
+Interface class for colors representation.
@ colors_16
16 colors mode.
-background in 256-colors mode.
-static char default_hfill_char
Default character used as a filling for right-align the right part of messages with "{hfill}".
-bool matches
Everything is compatible.
+background in 256-colors mode.
+static char default_hfill_char
Default character used as a filling for right-align the right part of messages with "{hfill}".
+bool matches
Everything is compatible.
enum clutchlog::fmt::typo style
Typographic style.
-Abstract base class for 16M colors objects (24-bits ANSI).
-fg_256(const fg &)
Conversion constructor from 16-colors mode.
-void format_comment(const std::string &format)
Set the template string for dumps.
-bg_16M(const std::string &srgb)
Hex triplet string constructor.
-void file(std::string file)
Set the regular expression filtering the file location.
-scope_t locate(const level &stage, const std::string &file, const std::string &func, const size_t line) const
Gather information on the current location of the call.
+Abstract base class for 16M colors objects (24-bits ANSI).
+fg_256(const fg &)
Conversion constructor from 16-colors mode.
+void format_comment(const std::string &format)
Set the template string for dumps.
+bg_16M(const std::string &srgb)
Hex triplet string constructor.
+void file(std::string file)
Set the regular expression filtering the file location.
+scope_t locate(const level &stage, const std::string &file, const std::string &func, const size_t line) const
Gather information on the current location of the call.
clutchlog::fmt::fg_16M fore_16M
Current foreground in 16M-colors mode.
-Abstract base class for 256 colors objects (8-bits ANSI).
-fmt()
Empty constructor, only useful for a no-op formatter.
-void style(level stage, fmt style)
Set the style (color and typo) of the given log level, passing a fmt instance.
-void threshold(level l)
Set the log level (below which logs are not printed) with an identifier.
-level threshold() const
Get the log level below which logs are not printed.
+Abstract base class for 256 colors objects (8-bits ANSI).
+fmt()
Empty constructor, only useful for a no-op formatter.
+void style(level stage, fmt style)
Set the style (color and typo) of the given log level, passing a fmt instance.
+void threshold(level l)
Set the log level (below which logs are not printed) with an identifier.
+level threshold() const
Get the log level below which logs are not printed.
virtual bool is_set() const =0
Should return true if the underying representation encodes an existing color.
-std::map< level, std::string > _level_short
dictionary of level identifier to their 4-letters representation.
-level
Available log levels.
-color_256(ground t, const short i)
Constructor.
-std::ostream & print_on(std::ostream &os) const
Print the color index on the given stream.
-color_16M(ground t)
Constructor.
-static size_t default_hfill_max
Default maximum width (number of characters) for which to fill for right-aligning the right part of m...
-void funchash_styles(std::vector< fmt > styles)
Set the candidate styles for value-dependant function name formatting.
-
-std::regex _in_func
Current function location filter.
-static std::string default_format
Default format of the messages.
-bg_16M(short r, short g, short b)
Numeric triplet constructor.
-static clutchlog & logger()
Get the logger instance.
-Foreground in 256-colors mode.
-void dump(const level &stage, const In container_begin, const In container_end, const std::string &file, const std::string &func, size_t line, const std::string &filename_template="dump_{n}.dat", const std::string sep=dump_default_sep) const
Dump a serializable container after a comment line with log information.
+std::map< level, std::string > _level_short
dictionary of level identifier to their 4-letters representation.
+level
Available log levels.
+color_256(ground t, const short i)
Constructor.
+std::ostream & print_on(std::ostream &os) const
Print the color index on the given stream.
+color_16M(ground t)
Constructor.
+static size_t default_hfill_max
Default maximum width (number of characters) for which to fill for right-aligning the right part of m...
+void funchash_styles(std::vector< fmt > styles)
Set the candidate styles for value-dependant function name formatting.
+
+std::regex _in_func
Current function location filter.
+static std::string default_format
Default format of the messages.
+bg_16M(short r, short g, short b)
Numeric triplet constructor.
+static clutchlog & logger()
Get the logger instance.
+Foreground in 256-colors mode.
clutchlog::fmt::fg_256 fore_256
Current foreground in 256-colors mode.
enum clutchlog::fmt::fg fore
Foreground color.
-void filehash_styles(std::vector< fmt > styles)
Set the candidate styles for value-dependant file name formatting.
+void filehash_styles(std::vector< fmt > styles)
Set the candidate styles for value-dependant file name formatting.
enum clutchlog::fmt::color::ground type
Type of color (foreground or background).
-Color and style formatter for ANSI terminal escape sequences.
-short index
The encoded color index in 4-bits ANSI.
-bg_256()
Empty constructor: no color.
-void func(std::string func)
Set the regular expression filtering the function location.
-std::string format() const
Get the template string.
-std::regex _in_file
Current file location filter.
-void style(level stage, FMT... styles)
Set the style (color and typo) of the given log level.
-bg_256(const bg &)
Conversion constructor from 16-colors mode.
-fg_16M()
Empty constructor: no color.
-level level_of(const std::string name)
Return the log level tag corresponding to the given pre-configured name.
-const std::map< level, std::string > _level_word
Dictionary of level identifier to their string representation.
-std::string operator()(const std::string &msg) const
Format the given string with the currently encoded format.
-color_16M(ground t, short r, short g, short b)
Numeric triplet constructor.
-std::ostream & print_on(std::ostream &os) const
Print the color RGB triplet on the given stream.
-bg
Background color codes.
-#define CLUTCHLOG_DEFAULT_FORMAT
Compile-time default format of the messages (debug mode: with absolute location).
-std::regex _in_line
Current line location filter.
-fg_256(const short f)
Constructor.
+Color and style formatter for ANSI terminal escape sequences.
+short index
The encoded color index in 4-bits ANSI.
+bg_256()
Empty constructor: no color.
+void func(std::string func)
Set the regular expression filtering the function location.
+std::string format() const
Get the template string.
+std::regex _in_file
Current file location filter.
+void style(level stage, FMT... styles)
Set the style (color and typo) of the given log level.
+bg_256(const bg &)
Conversion constructor from 16-colors mode.
+fg_16M()
Empty constructor: no color.
+level level_of(const std::string name)
Return the log level tag corresponding to the given pre-configured name.
+const std::map< level, std::string > _level_word
Dictionary of level identifier to their string representation.
+std::string operator()(const std::string &msg) const
Format the given string with the currently encoded format.
+color_16M(ground t, short r, short g, short b)
Numeric triplet constructor.
+std::ostream & print_on(std::ostream &os) const
Print the color RGB triplet on the given stream.
+bg
Background color codes.
+#define CLUTCHLOG_DEFAULT_FORMAT
Compile-time default format of the messages (debug mode: with absolute location).
+std::regex _in_line
Current line location filter.
+fg_256(const short f)
Constructor.
@ colors_256
256 colors mode.
enum clutchlog::fmt::ansi mode
Current ANSI color mode.
-std::string replace(const std::string &form, const std::string &mark, const size_t tag) const
Replace mark by tag in form, converting tag to its string representation first.
-std::string format_comment() const
Get the template string for dumps.
-fg_256()
Empty constructor: no color.
+std::string replace(const std::string &form, const std::string &mark, const size_t tag) const
Replace mark by tag in form, converting tag to its string representation first.
+std::string format_comment() const
Get the template string for dumps.
+fg_256()
Empty constructor: no color.
@ colors_16M
16 millions ("true") colors mode.
-std::string _format_dump
Current format of the file output.
-#define CLUTCHDUMP_DEFAULT_SEP
Compile-time default item separator for dump.
-bg_256(const short b)
Constructor.
-ground
Codes for representing foreground or background.
-Structure holding a location matching.
-#define CLUTCHLOG_DEFAULT_HFILL_MARK
Character used as a filling for right-align the right part of messages with "{hfill}".
-std::ostream & print_on(std::ostream &os) const
Print the currently encoded format escape code on the given output stream.
-bool is_set() const
Returns true if the underying representation encodes an existing color.
-std::ostream * _out
Standard output.
-std::ostream & out()
Get the output stream on which to print.
-void threshold(const std::string &l)
Set the log level (below which logs are not printed) with a string.
+std::string _format_dump
Current format of the file output.
+#define CLUTCHDUMP_DEFAULT_SEP
Compile-time default item separator for dump.
+bg_256(const short b)
Constructor.
+ground
Codes for representing foreground or background.
+Structure holding a location matching.
+#define CLUTCHLOG_DEFAULT_HFILL_MARK
Character used as a filling for right-align the right part of messages with "{hfill}".
+std::ostream & print_on(std::ostream &os) const
Print the currently encoded format escape code on the given output stream.
+bool is_set() const
Returns true if the underying representation encodes an existing color.
+std::ostream * _out
Standard output.
+std::ostream & out()
Get the output stream on which to print.
+void threshold(const std::string &l)
Set the log level (below which logs are not printed) with a string.
virtual std::ostream & print_on(std::ostream &os) const =0
Should print the underlying representation on the given stream.
-const std::map< std::string, level > & levels() const
Get the map of available log levels string representations toward their identifier....
-size_t _strip_calls
Current number of call stack levels to remove from depth display.
-level stage
Current log level.
-bool there
Location is compatible.
-fg_16M(const std::string &srgb)
Hex triplet string constructor.
-#define CLUTCHLOG_STRIP_CALLS
Compile-time number of call stack levels to remove from depth display by default.
-friend std::ostream & operator<<(std::ostream &os, const fmt &fmt)
Output stream overload.
-bg_16M(const bg &)
Conversion constructor from 16-colors mode.
-bg_16M()
Empty constructor: no color.
-std::map< std::string, level > _word_level
Dictionary of level string to their identifier.
-level _stage
Current log level.
-fmt style(level stage) const
Get the configured fmt instance of the given log level.
-typo
Typographic style codes.
-void location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*")
Set the regular expressions filtering the location.
+const std::map< std::string, level > & levels() const
Get the map of available log levels string representations toward their identifier....
+size_t _strip_calls
Current number of call stack levels to remove from depth display.
+level stage
Current log level.
+bool there
Location is compatible.
+fg_16M(const std::string &srgb)
Hex triplet string constructor.
+#define CLUTCHLOG_STRIP_CALLS
Compile-time number of call stack levels to remove from depth display by default.
+friend std::ostream & operator<<(std::ostream &os, const fmt &fmt)
Output stream overload.
+void log(const level &stage, const std::string &what, const std::string &file, const std::string &func, const size_t line, const size_t depth_delta=0) const
Print a log message IF the location matches the given one.
+bg_16M(const bg &)
Conversion constructor from 16-colors mode.
+bg_16M()
Empty constructor: no color.
+std::map< std::string, level > _word_level
Dictionary of level string to their identifier.
+level _stage
Current log level.
+fmt style(level stage) const
Get the configured fmt instance of the given log level.
+typo
Typographic style codes.
+void location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*")
Set the regular expressions filtering the location.
#define CLUTCHLOG_HAVE_UNIX_SYSINFO
True if POSIX headers necessary for stack depth management are available.
-std::vector< fmt > _filehash_fmts
List of candidate format objects for value-dependant file name styling.
-The single class which holds everything.
-ansi
ANSI code configuring the available number of colors.
-fg_16M(short r, short g, short b)
Numeric triplet constructor.
-fg
Foreground color codes.
-short red
The encoded RGB indices.
-#define CLUTCHDUMP_DEFAULT_FORMAT
Compile-time default format of the comment line in file dump.
-color(ansi a, ground g)
Constructor.
+std::vector< fmt > _filehash_fmts
List of candidate format objects for value-dependant file name styling.
+The single class which holds everything.
+ansi
ANSI code configuring the available number of colors.
+fg_16M(short r, short g, short b)
Numeric triplet constructor.
+fg
Foreground color codes.
+short red
The encoded RGB indices.
+#define CLUTCHDUMP_DEFAULT_FORMAT
Compile-time default format of the comment line in file dump.
+color(ansi a, ground g)
Constructor.
clutchlog::fmt::bg_256 back_256
Current background in 256-colors mode.
diff --git a/docs/dir_000001_000000.html b/docs/dir_000001_000000.html
index 36c505f..52fdf46 100644
--- a/docs/dir_000001_000000.html
+++ b/docs/dir_000001_000000.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -84,7 +84,7 @@ $(document).ready(function(){initNavTree('dir_59425e443f801f1f2fd8bbe4959a3ccf.h
-
tests → clutchlog Relation
+tests → clutchlog Relation
diff --git a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf.html b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf.html
index ba6e854..035fbb8 100644
--- a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf.html
+++ b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -93,8 +93,7 @@ $(document).ready(function(){initNavTree('dir_59425e443f801f1f2fd8bbe4959a3ccf.h
diff --git a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.map b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.map
index 903a130..bb0a10c 100644
--- a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.map
+++ b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.map
@@ -1,5 +1,5 @@
-
+
diff --git a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.md5 b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.md5
index 2919850..0ad8513 100644
--- a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.md5
+++ b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.md5
@@ -1 +1 @@
-16d7faff1b9c3198b20cf3ae5437a2db
\ No newline at end of file
+531b57d09121179fe636e2cda048c80c
\ No newline at end of file
diff --git a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.svg b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.svg
index 211c012..57a16f0 100644
--- a/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.svg
+++ b/docs/dir_59425e443f801f1f2fd8bbe4959a3ccf_dep.svg
@@ -32,8 +32,8 @@
dir_59425e443f801f1f2fd8bbe4959a3ccf->dir_c318bd5cf14aaa5601e6029e0b5b4048
-
-11
+
+12
diff --git a/docs/dir_c318bd5cf14aaa5601e6029e0b5b4048.html b/docs/dir_c318bd5cf14aaa5601e6029e0b5b4048.html
index 8a19fbd..abfa9b5 100644
--- a/docs/dir_c318bd5cf14aaa5601e6029e0b5b4048.html
+++ b/docs/dir_c318bd5cf14aaa5601e6029e0b5b4048.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/files.html b/docs/files.html
index 7ec8eeb..f535eb4 100644
--- a/docs/files.html
+++ b/docs/files.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -97,11 +97,12 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });
t-color256.cpp
t-demo-extravagant.cpp
t-demo.cpp
- t-dump.cpp
- t-fmt-constructors.cpp
- t-hash-color.cpp
- t-log.cpp
- t-one-line-if.cpp
+ t-depth-delta.cpp
+ t-dump.cpp
+ t-fmt-constructors.cpp
+ t-hash-color.cpp
+ t-log.cpp
+ t-one-line-if.cpp
diff --git a/docs/files_dup.js b/docs/files_dup.js
index bda5401..de394c4 100644
--- a/docs/files_dup.js
+++ b/docs/files_dup.js
@@ -7,6 +7,7 @@ var files_dup =
[ "t-color256.cpp", "t-color256_8cpp_source.html", null ],
[ "t-demo-extravagant.cpp", "t-demo-extravagant_8cpp_source.html", null ],
[ "t-demo.cpp", "t-demo_8cpp_source.html", null ],
+ [ "t-depth-delta.cpp", "t-depth-delta_8cpp_source.html", null ],
[ "t-dump.cpp", "t-dump_8cpp_source.html", null ],
[ "t-fmt-constructors.cpp", "t-fmt-constructors_8cpp_source.html", null ],
[ "t-hash-color.cpp", "t-hash-color_8cpp_source.html", null ],
diff --git a/docs/functions.html b/docs/functions.html
index b3457b8..7ae6bc1 100644
--- a/docs/functions.html
+++ b/docs/functions.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -197,7 +197,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
: clutchlog
dump()
-: clutchlog
+: clutchlog
dump_default_format
: clutchlog
@@ -290,7 +290,7 @@ $(document).ready(function(){initNavTree('functions.html',''); initResizable();
: clutchlog
log()
-: clutchlog
+: clutchlog
logger()
: clutchlog
diff --git a/docs/functions_enum.html b/docs/functions_enum.html
index c268733..3dccd46 100644
--- a/docs/functions_enum.html
+++ b/docs/functions_enum.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/functions_func.html b/docs/functions_func.html
index 955935c..eab349f 100644
--- a/docs/functions_func.html
+++ b/docs/functions_func.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -114,7 +114,7 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
: clutchlog
dump()
-: clutchlog
+: clutchlog
@@ -176,7 +176,7 @@ $(document).ready(function(){initNavTree('functions_func.html',''); initResizabl
: clutchlog
log()
-: clutchlog
+: clutchlog
logger()
: clutchlog
diff --git a/docs/functions_rela.html b/docs/functions_rela.html
index 42d1030..c2eefc2 100644
--- a/docs/functions_rela.html
+++ b/docs/functions_rela.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/functions_vars.html b/docs/functions_vars.html
index c5212bc..d4a0507 100644
--- a/docs/functions_vars.html
+++ b/docs/functions_vars.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/globals.html b/docs/globals.html
index 30cf2a9..918f052 100644
--- a/docs/globals.html
+++ b/docs/globals.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -130,6 +130,9 @@ $(document).ready(function(){initNavTree('globals.html',''); initResizable(); })
CLUTCHLOG_STRIP_CALLS
: clutchlog.h
+CLUTCHLOGD
+: clutchlog.h
+
WITH_CLUTCHLOG
: clutchlog.h
diff --git a/docs/globals_defs.html b/docs/globals_defs.html
index 222ec62..a0cb07e 100644
--- a/docs/globals_defs.html
+++ b/docs/globals_defs.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -130,6 +130,9 @@ $(document).ready(function(){initNavTree('globals_defs.html',''); initResizable(
CLUTCHLOG_STRIP_CALLS
: clutchlog.h
+CLUTCHLOGD
+: clutchlog.h
+
WITH_CLUTCHLOG
: clutchlog.h
diff --git a/docs/graph_legend.html b/docs/graph_legend.html
index 8e89892..edb553d 100644
--- a/docs/graph_legend.html
+++ b/docs/graph_legend.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/group___default_config.html b/docs/group___default_config.html
index 3453ca4..fe42a2a 100644
--- a/docs/group___default_config.html
+++ b/docs/group___default_config.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/group___formating.html b/docs/group___formating.html
index f29caec..5bbe894 100644
--- a/docs/group___formating.html
+++ b/docs/group___formating.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/group___main.html b/docs/group___main.html
index f62f38f..80a0c24 100644
--- a/docs/group___main.html
+++ b/docs/group___main.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
diff --git a/docs/group___main.js b/docs/group___main.js
index 9920517..c1d2ac0 100644
--- a/docs/group___main.js
+++ b/docs/group___main.js
@@ -1,11 +1,11 @@
var group___main =
[
[ "clutchlog", "classclutchlog.html", [
- [ "System-dependent stack depth", "index.html#autotoc_md24", null ],
- [ "System-dependent horizontal fill", "index.html#autotoc_md25", null ],
- [ "Dependencies", "index.html#autotoc_md26", null ],
- [ "Variable names within the CLUTCHLOG macro", "index.html#autotoc_md27", null ],
- [ "Features", "index.html#autotoc_md28", null ],
+ [ "System-dependent stack depth", "index.html#autotoc_md26", null ],
+ [ "System-dependent horizontal fill", "index.html#autotoc_md27", null ],
+ [ "Dependencies", "index.html#autotoc_md28", null ],
+ [ "Variable names within the CLUTCHLOG macro", "index.html#autotoc_md29", null ],
+ [ "Features", "index.html#autotoc_md30", null ],
[ "scope_t", "structclutchlog_1_1scope__t.html", [
[ "scope_t", "structclutchlog_1_1scope__t.html#a0f1d865ffcf17f215e5559cdd2690572", null ],
[ "matches", "structclutchlog_1_1scope__t.html#ae6c0e4ed20db797124ed1e5faa033ad9", null ],
@@ -41,8 +41,8 @@ var group___main =
[ "replace", "classclutchlog.html#a972f895c70edc335f3018a2c8971d59e", null ],
[ "replace", "classclutchlog.html#ae90d5a1a428587ad67b38b2ea4ca9fa2", null ],
[ "format", "classclutchlog.html#abd692cca9a2e772e7c9d6531bb3c7761", null ],
- [ "log", "classclutchlog.html#a23dbb98f0d3c5cc21c232cde16cf317a", null ],
- [ "dump", "classclutchlog.html#a63308e8deae3cfec6801318203494143", null ],
+ [ "log", "classclutchlog.html#a14c19e17c54d6353ba34c0dc3371094a", null ],
+ [ "dump", "classclutchlog.html#ab72a0adc9ff287270afe09c9da825fdb", null ],
[ "default_format", "classclutchlog.html#a0c4ac57601e6f8d146fd5cc060968ecc", null ],
[ "dump_default_format", "classclutchlog.html#ace879554298e6e6e36dafef330c27be8", null ],
[ "dump_default_sep", "classclutchlog.html#af898bffe23b125245e338d7495c76d45", null ],
diff --git a/docs/group___use_macros.html b/docs/group___use_macros.html
index 359c78e..dfca8d2 100644
--- a/docs/group___use_macros.html
+++ b/docs/group___use_macros.html
@@ -28,7 +28,7 @@
clutchlog
- 0.14
+ 0.15
@@ -98,8 +98,12 @@ Macros
#define CLUTCHLOC __FILE__, __FUNCTION__, __LINE__
Handy shortcuts to location.
-#define CLUTCHLOG (LEVEL, WHAT)
- Log a message at the given level. More...
+#define CLUTCHLOGD (LEVEL, WHAT, DEPTH_DELTA)
+ Log a message at the given level and with a given depth delta. More...
+
+
+#define CLUTCHLOG (LEVEL, WHAT) CLUTCHLOGD (LEVEL, WHAT, 0)
+ Log a message at the given level.
#define CLUTCHDUMP (LEVEL, CONTAINER, FILENAME)
Dump the given container. More...
@@ -112,14 +116,14 @@ Macros
-Call any function if the scope matches.
-Run any code if the scope matches.
-You may want to manually increase the stack depth for a given logging call, for instance to subdivise a single function in sections. To do so, you can use the CLUTCHLOGD macro, which take an additional argument, in the form of the number of additional (fake) stack depths you want:
That way, the depth will be rendered to the actual depth, plus the additional depth delta. Note that the displayed function will stay the same. Any filtering on the stack depth will take into account the fake depth and not the real one.
+Because access to the call stack depth and program name are system-dependent, the features relying on the depth of the call stack and the display of the program name are only available for operating systems having the following headers: execinfo.h, stdlib.h and libgen.h (so far, tested with Linux).
If you use unicode characters in your template, the horizontal width will not be computed properly, resulting in incorrectly right-aligned lines. Solving this would require the use of third-party libraries, making portability more difficult.
-Some colors/styles may not be supported by some exotic terminal emulators.
To use clutchlog, just include its header in your code and either ensure that the NDEBUG preprocessor variable is not set, either define the WITH_CLUTCHLOG preprocessor variable.