diff --git a/docs/annotated.html b/docs/annotated.html index 37e60d2..6570179 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -2,8 +2,8 @@
- - + +|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog, including all inherited members.
| _filehash_fmts | clutchlog | protected |
| _filename | clutchlog | protected |
| _filename | clutchlog | protected |
| _format_dump | clutchlog | protected |
| _format_log | clutchlog | protected |
| _format_log | clutchlog | protected |
| _funchash_fmts | clutchlog | protected |
| _in_file | clutchlog | protected |
| _in_file | clutchlog | protected |
| _in_func | clutchlog | protected |
| _in_line | clutchlog | protected |
| _in_line | clutchlog | protected |
| _level_fmt | clutchlog | protected |
| _level_short | clutchlog | protected |
| _level_short | clutchlog | protected |
| _level_word | clutchlog | protected |
| _out | clutchlog | protected |
| _out | clutchlog | protected |
| _stage | clutchlog | protected |
| _strip_calls | clutchlog | protected |
| _strip_calls | clutchlog | protected |
| _word_level | clutchlog | protected |
| base enum value (defined in clutchlog) | clutchlog | |
| base enum value (defined in clutchlog) | clutchlog | |
| clutchlog(clutchlog const &)=delete (defined in clutchlog) | clutchlog | |
| clutchlog() (defined in clutchlog) | clutchlog | inlineprivate |
| clutchlog() (defined in clutchlog) | clutchlog | inlineprivate |
| critical enum value (defined in clutchlog) | clutchlog | |
| debug enum value (defined in clutchlog) | clutchlog | |
| debug enum value (defined in clutchlog) | clutchlog | |
| default_depth_mark | clutchlog | inlineprotectedstatic |
| default_format | clutchlog | inlineprotectedstatic |
| default_format | clutchlog | inlineprotectedstatic |
| default_hfill_char | clutchlog | inlineprotectedstatic |
| default_hfill_max | clutchlog | inlineprotectedstatic |
| default_hfill_max | clutchlog | inlineprotectedstatic |
| default_hfill_min | clutchlog | inlineprotectedstatic |
| default_strip_calls | clutchlog | inlineprotectedstatic |
| default_strip_calls | clutchlog | inlineprotectedstatic |
| depth_styles(std::vector< fmt > styles) | clutchlog | inline |
| dir enum value (defined in clutchlog) | clutchlog | |
| dir enum value (defined in clutchlog) | clutchlog | |
| dirbase enum value (defined in clutchlog) | clutchlog | |
| dirstem enum value (defined in clutchlog) | clutchlog | |
| dirstem enum value (defined in clutchlog) | clutchlog | |
| 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 | clutchlog | inline |
| dump_default_format | clutchlog | inlineprotectedstatic |
| dump_default_format | clutchlog | inlineprotectedstatic |
| dump_default_sep | clutchlog | inlineprotectedstatic |
| error enum value (defined in clutchlog) | clutchlog | |
| error enum value (defined in clutchlog) | clutchlog | |
| file(std::string file) | clutchlog | inline |
| filehash_styles(std::vector< fmt > styles) | clutchlog | inline |
| filehash_styles(std::vector< fmt > styles) | clutchlog | inline |
| filename enum name | clutchlog | |
| filename(filename f) | clutchlog | inline |
| filename(filename f) | clutchlog | inline |
| format(const std::string &format) | clutchlog | inline |
| format() const | clutchlog | inline |
| format() const | clutchlog | inline |
| format(std::string row, const std::string &what, const level &stage, const std::string &file, const std::string &func, const size_t line) const | clutchlog | inline |
| format_comment(const std::string &format) | clutchlog | inline |
| format_comment(const std::string &format) | clutchlog | inline |
| format_comment() const | clutchlog | inline |
| func(std::string func) | clutchlog | inline |
| func(std::string func) | clutchlog | inline |
| funchash_styles(std::vector< fmt > styles) | clutchlog | inline |
| info enum value (defined in clutchlog) | clutchlog | |
| info enum value (defined in clutchlog) | clutchlog | |
| level enum name | clutchlog | |
| level_of(const std::string name) | clutchlog | inline |
| levels() const | clutchlog | inline |
| line(std::string line) | clutchlog | inline |
| level_of(const std::string name) | clutchlog | inline |
| levels() const | clutchlog | inline |
| line(std::string line) | clutchlog | inline |
| locate(const level &stage, const std::string &file, const std::string &func, const size_t line) const | clutchlog | inline |
| location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*") | clutchlog | inline |
| location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*") | clutchlog | inline |
| 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 | clutchlog | inline |
| logger() | clutchlog | inlinestatic |
| logger() | clutchlog | inlinestatic |
| note enum value (defined in clutchlog) | clutchlog | |
| operator=(clutchlog const &)=delete (defined in clutchlog) | clutchlog | |
| operator=(clutchlog const &)=delete (defined in clutchlog) | clutchlog | |
| out(std::ostream &out) | clutchlog | inline |
| out() | clutchlog | inline |
| out() | clutchlog | inline |
| path enum value (defined in clutchlog) | clutchlog | |
| progress enum value (defined in clutchlog) | clutchlog | |
| progress enum value (defined in clutchlog) | clutchlog | |
| replace(const std::string &form, const std::string &mark, const std::string &tag) const | clutchlog | inline |
| replace(const std::string &form, const std::string &mark, const size_t tag) const | clutchlog | inline |
| replace(const std::string &form, const std::string &mark, const size_t tag) const | clutchlog | inline |
| stem enum value (defined in clutchlog) | clutchlog | |
| style(level stage, FMT... styles) | clutchlog | inline |
| style(level stage, FMT... styles) | clutchlog | inline |
| style(level stage, fmt style) | clutchlog | inline |
| style(level stage) const | clutchlog | inline |
| style(level stage) const | clutchlog | inline |
| threshold(level l) | clutchlog | inline |
| threshold(const std::string &l) | clutchlog | inline |
| threshold(const std::string &l) | clutchlog | inline |
| threshold() const | clutchlog | inline |
| warning enum value (defined in clutchlog) | clutchlog | |
| warning enum value (defined in clutchlog) | clutchlog | |
| xdebug enum value (defined in clutchlog) | clutchlog |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
#include <clutchlog.h>
The single class which holds everything.
-This is a Singleton class.
+The single class which holds everything.
+This is a Singleton class.
-Definition at line 187 of file clutchlog.h.
+Definition at line 188 of file clutchlog.h.
+Public Member Functions | Set the template string. More... | | Get the template string. More... | | Set the template string for dumps. More... | | Get the template string for dumps. More... | | Set the output stream on which to print. More... | | void | filehash_styles (std::vector< fmt > styles) | | Set the candidate styles for value-dependant file name formatting. More... | | void | depth_styles (std::vector< fmt > styles) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the styles for value-dependant depth formatting. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | threshold (level l) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the log level (below which logs are not printed) with an identifier. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | threshold (level l) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the log level (below which logs are not printed) with an identifier. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | threshold (const std::string &l) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the log level (below which logs are not printed) with a string. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | threshold (const std::string &l) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the log level (below which logs are not printed) with a string. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -level | threshold () const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the log level below which logs are not printed. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| level | threshold () const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the log level below which logs are not printed. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -const std::map< std::string, level > & | levels () const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the map of available log levels string representations toward their identifier. */. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| const std::map< std::string, level > & | levels () const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the map of available log levels string representations toward their identifier. */. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| level | level_of (const std::string name) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Return the log level tag corresponding to the given pre-configured name. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | file (std::string file) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the file location. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | file (std::string file) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the file location. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | func (std::string func) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the function location. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | func (std::string func) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the function location. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | line (std::string line) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the line location. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | line (std::string line) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expression filtering the line location. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | location (const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*") | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expressions filtering the location. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | location (const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*") | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the regular expressions filtering the location. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| template<class ... FMT> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | style (level stage, FMT... styles) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Set the style (color and typo) of the given log level. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | style (level stage, fmt style) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set the style (color and typo) of the given log level, passing a fmt instance. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | style (level stage, fmt style) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Set the style (color and typo) of the given log level, passing a fmt instance. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -fmt | style (level stage) const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the configured fmt instance of the given log level. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| fmt | style (level stage) const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Get the configured fmt instance of the given log level. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -void | filename (filename f) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sets the file naming scheme. */. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| void | filename (filename f) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Sets the file naming scheme. */. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Low-level API | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| std::string | replace (const std::string &form, const std::string &mark, const std::string &tag) const | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Replace mark by tag in form. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -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 | 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. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -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 corresponding to the log level. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 corresponding to the log level. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| -template<class In > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| template<class In > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Dump a serializable container after a comment line with log information. More... | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+Static Protected Attributes | Default format of the messages. More... | | Default format of the comment line in file dump. More... | | Default item separator for dump. More... | | Default mark for stack depth. More... | | Number of call stack levels to remove from depth display by default. More... | | Default character used as a filling for right-align the right part of messages with "{hfill}". More... | | Default maximum width (number of characters) for which to fill for right-aligning the right part of messages (using "{hfill}"). More... | | Default minimum width (number of characters) at which to fill for right-aligning the right part of messages (using "{hfill}"). More... | | | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+Classesclass | fmt | | |||||
| Structure holding a location matching. More... | |||||||
-High-level API | |
| enum | level { - critical =0, -error =1, -warning =2, -progress =3, - - note =4, -info =5, -debug =6, -xdebug =7 + |
High-level API | |
| enum | level { + critical =0 +, error =1 +, warning =2 +, progress =3 +, + note =4 +, info =5 +, debug =6 +, xdebug =7 } |
| Available log levels. | |
| Available log levels. More... | |
| enum | filename { - path, -base, -dir, -dirbase, - - stem, -dirstem + |
| enum | filename { + path +, base +, dir +, dirbase +, + stem +, dirstem } |
| Available filename rendering methods. | |
| Available filename rendering methods. More... | |
| static clutchlog & | logger () |
| Get the logger instance. More... | |
| static clutchlog & | logger () |
| Get the logger instance. More... | |
-Internal details | |
| -size_t | _strip_calls |
| Current number of call stack levels to remove from depth display. | |
Internal details | |
| size_t | _strip_calls |
| Current number of call stack levels to remove from depth display. More... | |
| -const std::map< level, std::string > | _level_word |
| Dictionary of level identifier to their string representation. | |
| const std::map< level, std::string > | _level_word |
| Dictionary of level identifier to their string representation. More... | |
| -std::map< std::string, level > | _word_level |
| Dictionary of level string to their identifier. | |
| std::map< std::string, level > | _word_level |
| Dictionary of level string to their identifier. More... | |
| -std::map< level, std::string > | _level_short |
| dictionary of level identifier to their 4-letters representation. | |
| std::map< level, std::string > | _level_short |
| dictionary of level identifier to their 4-letters representation. More... | |
| -std::map< level, fmt > | _level_fmt |
| Dictionary of level identifier to their format. | |
| std::map< level, fmt > | _level_fmt |
| Dictionary of level identifier to their format. More... | |
| -std::string | _format_log |
| Current format of the standard output. | |
| std::string | _format_log |
| Current format of the standard output. More... | |
| -std::string | _format_dump |
| Current format of the file output. | |
| std::string | _format_dump |
| Current format of the file output. More... | |
| -std::ostream * | _out |
| Standard output. | |
| std::ostream * | _out |
| Standard output. More... | |
| -level | _stage |
| Current log level. | |
| level | _stage |
| Current log level. More... | |
| -std::regex | _in_file |
| Current file location filter. | |
| std::regex | _in_file |
| Current file location filter. More... | |
| -std::regex | _in_func |
| Current function location filter. | |
| std::regex | _in_func |
| Current function location filter. More... | |
| -std::regex | _in_line |
| Current line location filter. | |
| std::regex | _in_line |
| Current line location filter. More... | |
| -std::vector< fmt > | _filehash_fmts |
| List of candidate format objects for value-dependant file name styling. | |
| std::vector< fmt > | _filehash_fmts |
| List of candidate format objects for value-dependant file name styling. More... | |
| -std::vector< fmt > | _funchash_fmts |
| List of candidate format objects for value-dependant function name styling. | |
| std::vector< fmt > | _funchash_fmts |
| List of candidate format objects for value-dependant function name styling. More... | |
| -filename | _filename |
| Filename rendering method. | |
| filename | _filename |
| Filename rendering method. More... | |
| + | |
| clutchlog (clutchlog const &)=delete | |
| + | |
| void | operator= (clutchlog const &)=delete |
| - | clutchlog () |
| clutchlog () | |
| static clutchlog& clutchlog::logger | +clutchlog::clutchlog | +( | +) | ++ |
Definition at line 850 of file clutchlog.h.
+ +
+
+
+
+
+
+Return the formatting code as a string. + +Definition at line 822 of file clutchlog.h. + +References print_on(). + +◆ hash()+ +
+
+
+
+
+
+Definition at line 829 of file clutchlog.h. + +Friends And Related Function Documentation+ +◆ operator<<+ +
+
+
-
-
+ File List File List Here is a list of all documented files with brief descriptions:
-
Here is a list of all documented class members with links to the class documentation for each member:
-- _ -
- _ -
- a -
- a -
- b -
- b -
- c -
- c -
- d -
- d -
- f -
- f -
- g -
- g -
- i -
- i -
- l -
- l -
- m -
- m -
- o -
- o -
- p -
- p -
- r -
- r -
- s -
- s -
- t -
- t -
-
diff --git a/docs/functions_rela.html b/docs/functions_rela.html
index 035e264..039fac1 100644
--- a/docs/functions_rela.html
+++ b/docs/functions_rela.html
@@ -2,8 +2,8 @@
-
-
+
+
- b -
- b -
- c -
- c -
- d -
- d --- f -
- f -
- i -
- i --- l -
- l -
- o -
- o -
- p -
- p -
- r -
- r -
- s -
- s -
- t -
-
diff --git a/docs/globals.html b/docs/globals.html
index 7584db1..4216408 100644
--- a/docs/globals.html
+++ b/docs/globals.html
@@ -2,8 +2,8 @@
-
-
+
+
- _ -
- _ -
- b -
- b -
- d -
- d -
- f -
- f -
- i -
- i -
- m -
- m -
- r -
- r -
- s -
- s -
- t -
- t -
Here is a list of all documented file members with links to the documentation:
-
-
+ Graph Legend Graph Legend
-
@@ -86,54 +86,168 @@ $(document).ready(function(){initNavTree('group___default_config.html',''); init
This page explains how to interpret the graphs that are generated by doxygen. -Consider the following example: /*! Invisible class because of truncation */
+This page explains how to interpret the graphs that are generated by doxygen. +Consider the following example: /*! Invisible class because of truncation */
class Invisible { };
/*! Truncated class, inheritance relation is hidden */
@@ -124,7 +123,7 @@ $(document).ready(function(){initNavTree('graph_legend.html',''); initResizable(
Used *m_usedClass;
};
This will result in the following graph: -The boxes in the above graph have the following meaning: +The boxes in the above graph have the following meaning:
The arrows have the following meaning: +The arrows have the following meaning:
Detailed Description
Macro Definition Documentation+ +◆ CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG+ +
+
+
+
+
+
+
+Default level over which calls to the logger are optimized out when NDEBUG is defined. + +Definition at line 68 of file clutchlog.h. + +◆ CLUTCHLOG_DEFAULT_FORMAT+ +
+
+
+
+
+
+Compile-time default format of the messages (debug mode: with absolute location). + +Definition at line 209 of file clutchlog.h. + +◆ CLUTCHDUMP_DEFAULT_FORMAT+ +
+
+
+
+
+
+
+Compile-time default format of the comment line in file dump. + +Definition at line 232 of file clutchlog.h. + +◆ CLUTCHDUMP_DEFAULT_SEP+ +
+
+
+
+
+
+
+Compile-time default item separator for dump. + +Definition at line 250 of file clutchlog.h. + +◆ CLUTCHLOG_DEFAULT_DEPTH_MARK+ +
+
+
+
+
+
+
+Compile-time default mark for stack depth. + +Definition at line 257 of file clutchlog.h. + +◆ CLUTCHLOG_STRIP_CALLS+ +
+
+
+
+
+
+
+Compile-time number of call stack levels to remove from depth display by default. + +Definition at line 264 of file clutchlog.h. + +◆ CLUTCHLOG_DEFAULT_HFILL_MARK+ +
+
+
+
+
+Character used as a filling for right-align the right part of messages with "{hfill}". + +Definition at line 271 of file clutchlog.h. + +
Detailed Description
Detailed Description
Detailed Description
Macro Definition Documentation- + +◆ CLUTCHLOC+ +
+
+
+
+
+
+Handy shortcuts to location. + +Definition at line 78 of file clutchlog.h. + +◆ CLUTCHLOGD
@@ -148,18 +163,52 @@ Macros
Value:
-
+
+ do { \
- auto& clutchlog__logger = clutchlog::logger(); \
+ auto& clutchlog__logger = clutchlog::logger(); \
std::ostringstream clutchlog__msg ; clutchlog__msg << WHAT; \
- clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC, DEPTH_DELTA); \
+ clutchlog__logger.log(clutchlog::level::LEVEL, clutchlog__msg.str(), CLUTCHLOC, DEPTH_DELTA); \
} while(0)
+
+
Log a message at the given level and with a given depth delta. -Definition at line 81 of file clutchlog.h. +Definition at line 82 of file clutchlog.h. ◆ CLUTCHLOG+ +
+
+
+
+
+
+Log a message at the given level. + +Definition at line 99 of file clutchlog.h. + +◆ CLUTCHDUMP
@@ -191,18 +240,19 @@ Macros
Value:
-
+
do { \
- auto& clutchlog__logger = clutchlog::logger(); \
+ auto& clutchlog__logger = clutchlog::logger(); \
clutchlog__logger.dump(clutchlog::level::LEVEL, std::begin(CONTAINER), std::end(CONTAINER), \
- CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
+ CLUTCHLOC, FILENAME, CLUTCHDUMP_DEFAULT_SEP); \
} while(0)
+#define CLUTCHDUMP_DEFAULT_SEP Compile-time default item separator for dump. Definition: clutchlog.h:250 Dump the given container. -Definition at line 107 of file clutchlog.h. +Definition at line 108 of file clutchlog.h. ◆ CLUTCHFUNC
@@ -234,8 +284,8 @@ Macros
Value:
do { \
- auto& clutchlog__logger = clutchlog::logger(); \
- clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ auto& clutchlog__logger = clutchlog::logger(); \
+ clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
if(clutchlog__scope.matches) { \
FUNC(__VA_ARGS__); \
} \
@@ -243,11 +293,11 @@ Macros
Call any function if the scope matches. -Definition at line 124 of file clutchlog.h. +Definition at line 125 of file clutchlog.h. ◆ CLUTCHCODE
@@ -273,8 +323,8 @@ Macros
Value: do { \
- auto& clutchlog__logger = clutchlog::logger(); \
- clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
+ auto& clutchlog__logger = clutchlog::logger(); \
+ clutchlog::scope_t clutchlog__scope = clutchlog__logger.locate(clutchlog::level::LEVEL, CLUTCHLOC); \
if(clutchlog__scope.matches) { \
__VA_ARGS__ \
} \
@@ -282,21 +332,16 @@ Macros | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
+Enumerationsenum class | clutchlog::fmt::fg { | + black = 30 +, red = 31 +, green = 32 +, yellow = 33 +, + blue = 34 +, magenta = 35 +, cyan = 36 +, white = 37 +, + bright_black = 90 +, bright_red = 91 +, bright_green = 92 +, bright_yellow = 93 +, + bright_blue = 94 +, bright_magenta = 95 +, bright_cyan = 96 +, bright_white = 97 +, none = -1 } | Foreground color codes. | | enum class | clutchlog::fmt::bg { | + black = 40 +, red = 41 +, green = 42 +, yellow = 43 +, + blue = 44 +, magenta = 45 +, cyan = 46 +, white = 47 +, + bright_black = 100 +, bright_red = 101 +, bright_green = 102 +, bright_yellow = 103 +, + bright_blue = 104 +, bright_magenta = 105 +, bright_cyan = 106 +, bright_white = 107 +, none = -1 } | Background color codes. | | enum | clutchlog::fmt::fg { - black = 30, -red = 31, -green = 32, -yellow = 33, - - blue = 34, -magenta = 35, -cyan = 36, -white = 37, - - bright_black = 90, -bright_red = 91, -bright_green = 92, -bright_yellow = 93, - - bright_blue = 94, -bright_magenta = 95, -bright_cyan = 96, -bright_white = 97, - + | Foreground color codes. More... | enum | clutchlog::fmt::bg { - black = 40, -red = 41, -green = 42, -yellow = 43, - - blue = 44, -magenta = 45, -cyan = 46, -white = 47, - - bright_black = 100, -bright_red = 101, -bright_green = 102, -bright_yellow = 103, - - bright_blue = 104, -bright_magenta = 105, -bright_cyan = 106, -bright_white = 107, - + | Background color codes. More... | ||||||||
+Variables
-enum clutchlog::fmt::fg | clutchlog::fmt::fore | |
-enum clutchlog::fmt::bg | clutchlog::fmt::back | | +enum clutchlog::fmt::fg | clutchlog::fmt::fore | Foreground color. | +enum clutchlog::fmt::bg | clutchlog::fmt::back | Background color. | ||||||||
+Friends
-std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const std::tuple< fg, bg, typo > &fbs) | | Output stream operator for a 3-tuple of 16-colors mode tags. | |
-std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const typo &s) | | Output stream operator for a typo tag alone, in 16-colors mode. | | std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const std::tuple< fg, bg, typo > &fbs) | | Output stream operator for a 3-tuple of 16-colors mode tags. More... | | std::ostream & | clutchlog::fmt::operator<< (std::ostream &os, const typo &s) | | Output stream operator for a typo tag alone, in 16-colors mode. More... | | ||||||||
+
|
+ +strong | +
Foreground color codes.
+ +Definition at line 404 of file clutchlog.h.
+ +
+
|
+ +strong | +
Background color codes.
+ +Definition at line 425 of file clutchlog.h.
+ +
+
|
+ +friend | +
Output stream operator for a 3-tuple of 16-colors mode tags.
+ +Definition at line 447 of file clutchlog.h.
+ +
+
|
+ +friend | +
Output stream operator for a typo tag alone, in 16-colors mode.
+ +Definition at line 469 of file clutchlog.h.
+ +|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
+Classesstruct | clutchlog::fmt::color | | |||||
| background in 256-colors mode. More... | |||||||
+Variables
-clutchlog::fmt::fg_256 | clutchlog::fmt::fore_256 | |
-clutchlog::fmt::bg_256 | clutchlog::fmt::back_256 | |
-clutchlog::fmt::fg_16M | clutchlog::fmt::fore_16M | |
-clutchlog::fmt::bg_16M | clutchlog::fmt::back_16M | | +clutchlog::fmt::fg_256 | clutchlog::fmt::fore_256 | Current foreground in 256-colors mode. | +clutchlog::fmt::bg_256 | clutchlog::fmt::back_256 | Current background in 256-colors mode. | +clutchlog::fmt::fg_16M | clutchlog::fmt::fore_16M | Current foreground in 16M-colors mode. | +clutchlog::fmt::bg_16M | clutchlog::fmt::back_16M | Current background in 16M-colors mode. | ||||||||||||
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Clutchlog is a spatial logging system that targets versatile debugging. It allows to (de)clutch messages for a given: log level, source code location or call stack depth.
+Clutchlog is a spatial logging system that targets versatile debugging. It allows to (de)clutch messages for a given: log level, source code location or call stack depth.
- -<img alt"Clutchlog logo" src="https://raw.githubusercontent.com/nojhan/clutchlog/master/docs/clutchlog_logo.svg" width="400" />
+ +<img alt"Clutchlog logo" src="https://raw.githubusercontent.com/nojhan/clutchlog/master/docs/clutchlog_logo.svg" width="400" />
Clutchlog allows to select which log messages will be displayed, based on their locations:
+Clutchlog allows to select which log messages will be displayed, based on their locations:
Additionally, Clutchlog will do its best to allow the compiler to optimize out calls, for instance debug messages in "Release" builds.
-Additional features:
+Additionally, Clutchlog will do its best to allow the compiler to optimize out calls, for instance debug messages in "Release" builds.
+Additional features:
Adding a message is a simple as calling a macro (which is declutched in Debug build type, when NDEBUG is not defined):
To configure the display, you indicate the three types of locations, for example in your main function:
Adding a message is a simple as calling a macro (which is declutched in Debug build type, when NDEBUG is not defined):
To configure the display, you indicate the three types of locations, for example in your main function:
Example of a real-life log session (as seen in the frictionlesser software):
-
Demo showing fancy styling:
-
For more detailled examples, see the "Usage" sections below and the tests directory.
Example of a real-life log session (as seen in the frictionlesser software):
+
Demo showing fancy styling:
+
For more detailled examples, see the "Usage" sections below and the tests directory.
Most of existing logging systems targets service events storage, like fast queuing of transactions in a round-robin database. Their aim is to provide a simple interface to efficiently store messages somewhere, which is appropriated when you have a well known service running and you want to be able to trace complex users interactions across its states.
-Clutchlog, however, targets the debugging of a (typically single-run) program. While you develop your software, it's common practice to output several detailled informations on the internal states around the feature you are currently programming. However, once the feature is up and running, those detailled informations are only useful if you encounter a bug traversing this specific part.
-While tracing a bug, it is tedious to uncomment old debugging code (and go on the build-test cycle) or to set up a full debugger session that displays all appropriate data (with ad-hoc fancy hooks).
-To solve this problem, Clutchlog allows to disengage at runtime your debug log messages in various parts of the program, allowing for the fast tracking of a bug across the execution.
+Most of existing logging systems targets service events storage, like fast queuing of transactions in a round-robin database. Their aim is to provide a simple interface to efficiently store messages somewhere, which is appropriated when you have a well known service running and you want to be able to trace complex users interactions across its states.
+Clutchlog, however, targets the debugging of a (typically single-run) program. While you develop your software, it's common practice to output several detailled informations on the internal states around the feature you are currently programming. However, once the feature is up and running, those detailled informations are only useful if you encounter a bug traversing this specific part.
+While tracing a bug, it is tedious to uncomment old debugging code (and go on the build-test cycle) or to set up a full debugger session that displays all appropriate data (with ad-hoc fancy hooks).
+To solve this problem, Clutchlog allows to disengage at runtime your debug log messages in various parts of the program, allowing for the fast tracking of a bug across the execution.
The main entrypoint is the CLUTCHLOG macro, which takes the desired log level and message. The message can be anything that can be output in an ostringstream.
The main entrypoint is the CLUTCHLOG macro, which takes the desired log level and message. The message can be anything that can be output in an ostringstream.
There is also a macro to dump the content of an iterable within a separate file: CLUTCHDUMP. This function takes care of incrementing a numeric suffix in the file name, if an existing file with this name exists.
There is also a macro to dump the content of an iterable within a separate file: CLUTCHDUMP. This function takes care of incrementing a numeric suffix in the file name, if an existing file with this name exists.
Note that if you pass a file name without the {n} tag, the file will be overwritten as is.
Note that if you pass a file name without the {n} tag, the file will be overwritten as is.
Log levels use a classical semantics for a human skilled in the art, in decreasing order of importance:
+Log levels use a classical semantics for a human skilled in the art, in decreasing order of importance:
Note: the log levels constants are lower case (for example: clutchlog::level::xdebug), but their string representation is not (e.g. "XDebug", this should be taken into account when using clutchlog::threshold or clutchlog::level_of).
Note: the log levels constants are lower case (for example: clutchlog::level::xdebug), but their string representation is not (e.g. "XDebug", this should be taken into account when using clutchlog::threshold or clutchlog::level_of).
To configure the global behaviour of the logger, you must first get a reference on its (singleton) instance:
One can configure the location(s) at which messages should actually be logged:
To configure the global behaviour of the logger, you must first get a reference on its (singleton) instance:
One can configure the location(s) at which messages should actually be logged:
Current levels are defined in an enumeration as clutchlog::level:
File, function and line filters are indicated using (ECMAScript) regular expressions:
Current levels are defined in an enumeration as clutchlog::level:
File, function and line filters are indicated using (ECMAScript) regular expressions:
A shortcut function can be used to filter all at once:
Strings may be used to set up the threshold:
Note that the case of the log levels strings matters (see below).
+A shortcut function can be used to filter all at once:
Strings may be used to set up the threshold:
Note that the case of the log levels strings matters (see below).
The output stream can be configured using the clutchlog::out method:
The format of the messages can be defined with the clutchlog::format method, passing a string with standardized tags surrounded by {}:
Available tags are:
+The output stream can be configured using the clutchlog::out method:
The format of the messages can be defined with the clutchlog::format method, passing a string with standardized tags surrounded by {}:
Available tags are:
{msg}: the logged message,{level}: the current log level (i.e. Critical, Error, Warning, Progress, Note, Info, Debug or XDebug),{filehash_fmt}: a style for file names, which is value-dependant (see clutchlog::filehash_styles),{funchash_fmt}: a style for function names, which is value-dependant (see clutchlog::funchash_styles).Some tags are only available on POSIX operating systems as of now:
Some tags are only available on POSIX operating systems as of now:
{name}: the name of the current binary,{depth}: the current depth of the call stack,{depth_marks}: as many chevrons > as there is calls in the stack,The default log format is "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func} @ {file}:{line}\n", it can be overriden at compile time by defining the CLUTCHLOG_DEFAULT_FORMAT macro.
By default, and if CLUTCHLOG_DEFAULT_FORMAT is not defined, clutchlog will not put the location-related tags in the message formats (i.e. {name}, {func}, and {line}) when not in Debug builds.
The default log format is "[{name}] {level_letter}:{depth_marks} {msg} {hfill} {func} @ {file}:{line}\n", it can be overriden at compile time by defining the CLUTCHLOG_DEFAULT_FORMAT macro.
By default, and if CLUTCHLOG_DEFAULT_FORMAT is not defined, clutchlog will not put the location-related tags in the message formats (i.e. {name}, {func}, and {line}) when not in Debug builds.
Output lines can be styled differently depending on their content.
-For example, output lines can be colored differently depending on the log level.
Output lines can be styled differently depending on their content.
+For example, output lines can be colored differently depending on the log level.
Or, if you want to declare some semantics beforehand:
Or, if you want to declare some semantics beforehand:
Note: this inserts a style marker at the very beginning of the line. If you add other styles later on the line, they will take precedence.
-Colors can be specified in several different ways. The ANSI color mode will be automatically detected, depending on the types of arguments passed to styling functions:
Note: this inserts a style marker at the very beginning of the line. If you add other styles later on the line, they will take precedence.
+Colors can be specified in several different ways. The ANSI color mode will be automatically detected, depending on the types of arguments passed to styling functions:
clutchlog::fmt::fg or clutchlog::fmt::bg will encode a 16-colors mode,clutchlog::fg::none and clutchlog::bg::none can be passed in all modes.For example, all the following lines encode a bright red foreground for the critical level (see the "Colors" section below):
For example, all the following lines encode a bright red foreground for the critical level (see the "Colors" section below):
You may use styling within the format message template itself, to add even more colors:
You may use styling within the format message template itself, to add even more colors:
Note: messages at the "critical", "error" and "warning" log levels are colored by default. You may want to set their style to none if you want to stay in control of inserted colors in the format template.
The horizontal filling line (the {hfill} tag) can be configured separately with clutchlog::hfill_style, for example:
Note: this will actually reset any styling after the hfill, disabling any style you would have set for the whole message using clutchlog::format for the remaining of the message.
Note: messages at the "critical", "error" and "warning" log levels are colored by default. You may want to set their style to none if you want to stay in control of inserted colors in the format template.
The horizontal filling line (the {hfill} tag) can be configured separately with clutchlog::hfill_style, for example:
Note: this will actually reset any styling after the hfill, disabling any style you would have set for the whole message using clutchlog::format for the remaining of the message.
Available typographies:
+Available typographies:
Typographic styles are always passed with the named tag (see clutchlog::fmt::typo), whatever the color mode.
Typographic styles are always passed with the named tag (see clutchlog::fmt::typo), whatever the color mode.
Using the clutchlog::fmt class, you can style:
Using the clutchlog::fmt class, you can style:
clutchlog::fmt::fg,clutchlog::fmt::bg.In 16-colors mode, any of the arguments may be passed, in any order, if an argument is omitted, it defaults to no color/style.
-Available colors are:
+In 16-colors mode, any of the arguments may be passed, in any order, if an argument is omitted, it defaults to no color/style.
+Available colors are:
Note: some terminals allow the user to configure the actual encoding of those colors. You may thus notice some difference with the expected rendering of the same colors encoded in the other modes. Use the other color modes if you want to fully control the actual color rendering.
+Note: some terminals allow the user to configure the actual encoding of those colors. You may thus notice some difference with the expected rendering of the same colors encoded in the other modes. Use the other color modes if you want to fully control the actual color rendering.
For 256-colors mode, colors are expected to be passed as integers in [-1,255] or the fg::none and bg::none tags.
In 256-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to bass a fg::none tag as first argument.
For 256-colors mode, colors are expected to be passed as integers in [-1,255] or the fg::none and bg::none tags.
In 256-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to bass a fg::none tag as first argument.
For 16M-colors mode, colors can be encoded as:
For 16M-colors mode, colors can be encoded as:
fg::none and bg::none tags.In 16M-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to pass a fg::none tag as first argument.
In 16M-colors mode, if you want to only encode the background color, you cannot just omit the foreground color, you have to pass a fg::none tag as first argument.
Some tags can be used to change the style of (part of) the output line,
-depending on its content. The {filehash_fmt} and {funchash_fmt} will introduce a styling sequence which depends on the current file name, and function name respectively. The chosen style is chosen at random among the candidate ones, but will always be the same for each value.
The set of candidate styles can be configured with clutchlog::filehash_styles and clutchlog::funchash_styles, which both take a vector of clutchlog::fmt objects as argument:
Some tags can be used to change the style of (part of) the output line,
+depending on its content. The {filehash_fmt} and {funchash_fmt} will introduce a styling sequence which depends on the current file name, and function name respectively. The chosen style is chosen at random among the candidate ones, but will always be the same for each value.
The set of candidate styles can be configured with clutchlog::filehash_styles and clutchlog::funchash_styles, which both take a vector of clutchlog::fmt objects as argument:
The same idea applies to {depth_fmt}. However, if clutchlog::depth_styles is configured, then the styles are chosen in order. That is, a depth of 1 would lead to the first style being chosen. If the current depth of the stack is larger than the number of configured styles, then the last one is used. For example:
The same idea applies to {depth_fmt}. However, if clutchlog::depth_styles is configured, then the styles are chosen in order. That is, a depth of 1 would lead to the first style being chosen. If the current depth of the stack is larger than the number of configured styles, then the last one is used. For example:
If clutchlog::depth_styles is set, the {depth_marks} template tag will render with each mark having each own style corresponding to its depth. Note: a depth of zero showing no mark, the first style in the list is never applied to marks.
If clutchlog::depth_styles is set, the {depth_marks} template tag will render with each mark having each own style corresponding to its depth. Note: a depth of zero showing no mark, the first style in the list is never applied to marks.
The default format of the first line of comment added with the dump macro is "# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}". It can be edited with the format_comment method. If it is set to an empty string, then no comment line is added. The default can be modified at compile time with CLUTCHDUMP_DEFAULT_FORMAT.
By default, the separator between items in the container is a new line. To change this behaviour, you can change CLUTCHDUMP_DEFAULT_SEP or call the low-level dump method.
By default, and if CLUTCHDUMP_DEFAULT_FORMAT is not defined, clutchlog will not put the location-related tags in the message formats (i.e. {file} and {line}) when not in Debug builds.
The default format of the first line of comment added with the dump macro is "# [{name}] {level} in {func} (at depth {depth}) @ {file}:{line}". It can be edited with the format_comment method. If it is set to an empty string, then no comment line is added. The default can be modified at compile time with CLUTCHDUMP_DEFAULT_FORMAT.
By default, the separator between items in the container is a new line. To change this behaviour, you can change CLUTCHDUMP_DEFAULT_SEP or call the low-level dump method.
By default, and if CLUTCHDUMP_DEFAULT_FORMAT is not defined, clutchlog will not put the location-related tags in the message formats (i.e. {file} and {line}) when not in Debug builds.
The mark used with the {depth_marks} tag can be configured with the clutchlog::depth_mark method, and its default with the CLUTCHLOG_DEFAULT_DEPTH_MARK macro:
The mark used with the {depth_marks} tag can be configured with the clutchlog::depth_mark method, and its default with the CLUTCHLOG_DEFAULT_DEPTH_MARK macro:
The character used with the {hfill} tag can be configured wth the clutchlog::hfill_mark method, and its default with the CLUTCHLOG_DEFAULT_HFILL_MARK macro:
Clutchlog measures the width of the standard error channel. If it is redirected, it may be measured as very large (or very small). Thus, the clutchlog::hfill_min clutchlog::hfill_max accessors allow to set a minimum and a maximum width (in number of characters).
The character used with the {hfill} tag can be configured wth the clutchlog::hfill_mark method, and its default with the CLUTCHLOG_DEFAULT_HFILL_MARK macro:
Clutchlog measures the width of the standard error channel. If it is redirected, it may be measured as very large (or very small). Thus, the clutchlog::hfill_min clutchlog::hfill_max accessors allow to set a minimum and a maximum width (in number of characters).
Note: clutchlog will use the measured width, unless it goes out of [clutchlog::hfill_min,clutchlog::hfill_max], in which case it will be caped to those bounds.
Note: clutchlog will use the measured width, unless it goes out of [clutchlog::hfill_min,clutchlog::hfill_max], in which case it will be caped to those bounds.
By default, clutchlog removes 5 levels of the calls stack, so that your main entrypoint corresponds to a depth of zero. You can change this behaviour by defining the CLUTCHLOG_STRIP_CALLS macro, or calling clutchlog::strip_calls.
By default, clutchlog removes 5 levels of the calls stack, so that your main entrypoint corresponds to a depth of zero. You can change this behaviour by defining the CLUTCHLOG_STRIP_CALLS macro, or calling clutchlog::strip_calls.
By default, the {file} template tag is rendered as the absolute path (which is usualy handy if your terminal detects paths and allows to run a command on click).
You can change this behavior to display shorter names, using clutchlog::filename, and passing one of the following the shortening method:
By default, the {file} template tag is rendered as the absolute path (which is usualy handy if your terminal detects paths and allows to run a command on click).
You can change this behavior to display shorter names, using clutchlog::filename, and passing one of the following the shortening method:
clutchlog::filename::base: the file name itself,clutchlog::filename::dir: the name of the single last directory containing the file,clutchlog::filename::dirbase: the last directory and the file names,clutchlog::filename::dirstem: the last directory and the file without extension.clutchlog::filename::path: the absolute path (the default).Example:
Example:
By default, clutchlog is always enabled if the NDEBUG preprocessor variable is not defined (this variable is set by CMake in build types that differs from Debug).
You can however force clutchlog to be enabled in any build type by setting the WITH_CLUTCHLOG preprocessor variable.
When the NDEBUG preprocessor variable is set (e.g. in Release build), clutchlog will do its best to allow the compiler to optimize out any calls for log levels that are under progress.
You can change this behavior at compile time by setting the CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG preprocessor variable to the desired maximum log level, for example:
By default, clutchlog is always enabled if the NDEBUG preprocessor variable is not defined (this variable is set by CMake in build types that differs from Debug).
You can however force clutchlog to be enabled in any build type by setting the WITH_CLUTCHLOG preprocessor variable.
When the NDEBUG preprocessor variable is set (e.g. in Release build), clutchlog will do its best to allow the compiler to optimize out any calls for log levels that are under progress.
You can change this behavior at compile time by setting the CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG preprocessor variable to the desired maximum log level, for example:
Note that allowing a log level does not mean that it will actually output something. If the configured log level at runtime is lower than the log level of the message, it will still not be printed.
-This behavior intend to remove as many conditional statements as possible when not debugging, without having to use preprocessor guards around calls to clutchlog, thus saving run time at no readability cost.
+Note that allowing a log level does not mean that it will actually output something. If the configured log level at runtime is lower than the log level of the message, it will still not be printed.
+This behavior intend to remove as many conditional statements as possible when not debugging, without having to use preprocessor guards around calls to clutchlog, thus saving run time at no readability cost.
All configuration setters have a getters counterpart, with the same name but taking no parameter, for example:
To control more precisely the logging, one can use the low-level clutchlog::log method:
A helper macro can helps to fill in the location with the actual one, as seen by the compiler:
A similar dump method exists:
All configuration setters have a getters counterpart, with the same name but taking no parameter, for example:
To control more precisely the logging, one can use the low-level clutchlog::log method:
A helper macro can helps to fill in the location with the actual one, as seen by the compiler:
A similar dump method exists:
You can access the identifier of log levels with clutchlog::level_of:
You can access the identifier of log levels with clutchlog::level_of:
The CLUTHFUNC macro allows to wrap any function within the current logger.
For instance, this can be useful if you want to (de)clutch calls to asserts. To do that, just declare your own macro:
Thus, any call like ASSERT(x > 3); will be declutchable with the same configuration than a call to CLUTCHLOG.
The CLUTHFUNC macro allows to wrap any function within the current logger.
For instance, this can be useful if you want to (de)clutch calls to asserts. To do that, just declare your own macro:
Thus, any call like ASSERT(x > 3); will be declutchable with the same configuration than a call to CLUTCHLOG.
The CLUTCHCODE macro allows to wrap any code within the current logger.
For instance:
The CLUTCHCODE macro allows to wrap any code within the current logger.
For instance:
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.
+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.
Here what you would do to setup clutchlog with the default configuration:
Here what you would do to setup clutchlog with the default configuration:
And here are all the functions you may call to log something:
And here are all the functions you may call to log something:
Here what you would do to setup clutchlog with the default configuration using 16M-colors mode:
Here what you would do to setup clutchlog with the default configuration using 16M-colors mode:
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).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSINFO to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
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).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSINFO to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
Because access to the current terminal width is system-dependent, the {hfill} format tag feature is only available for operating systems having the following headers: sys/ioctl.h, stdio.h and unistd.h (so far, tested with Linux).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSIOCTL to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
Because access to the current terminal width is system-dependent, the {hfill} format tag feature is only available for operating systems having the following headers: sys/ioctl.h, stdio.h and unistd.h (so far, tested with Linux).
Clutchlog sets the CLUTCHLOG_HAVE_UNIX_SYSIOCTL to 1 if the headers are available, and to 0 if they are not. You can make portable code using something like:
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.
+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.
-Clutchlog needs C++-17 with the filesystem feature. You may need to indicate -std=c++17 -lstdc++fs to some compilers.
Some colors/styles may not be supported by some exotic terminal emulators.
+Clutchlog needs C++-17 with the filesystem feature. You may need to indicate -std=c++17 -lstdc++fs to some compilers.
Calling the CLUTCHLOG macro with a message using a variable named clutchlog__msg will end in an error.
Calling the CLUTCHLOG macro with a message using a variable named clutchlog__msg will end in an error.
What Clutchlog do not provide at the moment (but may in a near future):
+What Clutchlog do not provide at the moment (but may in a near future):
What Clutchlog will most certainly never provide:
+What Clutchlog will most certainly never provide:
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.
If you're using CMake (or another modern build system), it will unset NDEBUG —and thus enable clutchlog— only for the "Debug" build type, which is usually what you want if you use clutchlog, anyway.
To build and run the tests, just use a classical CMake workflow:
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.
If you're using CMake (or another modern build system), it will unset NDEBUG —and thus enable clutchlog— only for the "Debug" build type, which is usually what you want if you use clutchlog, anyway.
To build and run the tests, just use a classical CMake workflow:
There's a script that tests all the build types combinations: ./build_all.sh.
There's a script that tests all the build types combinations: ./build_all.sh.
If you are using Git and CMake, it is easy to include Clutchlog as a dependency.
+First, add Clutchlog as a submodule of your repository:
Then, in your CMakeLists.txt file, add:
And that's it.
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::bg_16M, including all inherited members.
| bg_16M() | clutchlog::fmt::bg_16M | inline |
| bg_16M(short r, short g, short b) | clutchlog::fmt::bg_16M | inline |
| bg_16M(short r, short g, short b) | clutchlog::fmt::bg_16M | inline |
| bg_16M(const std::string &srgb) | clutchlog::fmt::bg_16M | inline |
| bg_16M(const bg &) | clutchlog::fmt::bg_16M | inline |
| bg_16M(const bg &) | clutchlog::fmt::bg_16M | inline |
| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color | |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
background in 256-colors mode.
+background in 256-colors mode.
-Definition at line 677 of file clutchlog.h.
+Definition at line 678 of file clutchlog.h.
+Public Member Functions
- | bg_16M () | | Empty constructor: no color. | | bg_16M () | | Numeric triplet constructor. More... | | Empty constructor: no color. More... | bg_16M (short r, short g, short b) | |||||||
| color_16M (ground t, const std::string &srgb) | |||||||||||||||||
| Hex triplet string constructor. More... | |||||||||||||||||
| -bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. | |||||||||||||||||
| bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||||||||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color RGB triplet on the given stream. | |||||||||||||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color RGB triplet on the given stream. More... | |||||||||||||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||||||||||||
| color (ansi a, ground g) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| virtual bool | is_set () const =0 | ||||||||||||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||||||||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||||||||||||
| Should print the underlying representation on the given stream. More... | |||||||||||||||||
+Additional Inherited Members Public Attributes inherited from clutchlog::fmt::color_16Mshort | red | | The encoded RGB indices. More... | short | green | short | blue | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | enum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||||||||||||||||||||||
Public Attributes inherited from clutchlog::fmt::color
Public Types inherited from clutchlog::fmt::color
+
|
+ +inline | +
Empty constructor: no color.
+ +Definition at line 680 of file clutchlog.h.
+ +Numeric triplet constructor.
-Parameters are expected to be in [0,255].
+Parameters are expected to be in [0,255].
| r | Red color component. | ||||||||||||||||||||||||||||||||||||||||||||||||||
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::bg_256, including all inherited members.
| bg_256() | clutchlog::fmt::bg_256 | inline |
| bg_256(const short b) | clutchlog::fmt::bg_256 | inline |
| bg_256(const short b) | clutchlog::fmt::bg_256 | inline |
| bg_256(const bg &) | clutchlog::fmt::bg_256 | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color | |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Background in 256-colors mode.
+Background in 256-colors mode.
-Definition at line 569 of file clutchlog.h.
+Definition at line 570 of file clutchlog.h.
+Public Member Functions
- | bg_256 () | | Empty constructor: no color. | | bg_256 () | | Constructor. More... | | Empty constructor: no color. More... | bg_256 (const short b) | |||||||
| color_256 (ground t, const short i) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| -bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. | |||||||||||||||||
| bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||||||||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color index on the given stream. | |||||||||||||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color index on the given stream. More... | |||||||||||||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||||||||||||
| color (ansi a, ground g) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| virtual bool | is_set () const =0 | ||||||||||||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||||||||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||||||||||||
| Should print the underlying representation on the given stream. More... | |||||||||||||||||
+Additional Inherited Members Public Attributes inherited from clutchlog::fmt::color_256short | index | | The encoded color index in 4-bits ANSI. More... | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | enum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||||||||||||||
Public Attributes inherited from clutchlog::fmt::color
Public Types inherited from clutchlog::fmt::color
+
|
+ +inline | +
Empty constructor: no color.
+ +Definition at line 572 of file clutchlog.h.
+ +Definition at line 577 of file clutchlog.h.
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::color, including all inherited members.
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| ground enum name | clutchlog::fmt::color | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const =0 | clutchlog::fmt::color | pure virtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| operator<<(std::ostream &os, const color &c) | clutchlog::fmt::color | friend |
| print_on(std::ostream &os) const =0 | clutchlog::fmt::color | pure virtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| operator<< | clutchlog::fmt::color | friend |
| print_on(std::ostream &os) const =0 | clutchlog::fmt::color | pure virtual |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Interface class for colors representation.
+Interface class for colors representation.
-Definition at line 483 of file clutchlog.h.
+Definition at line 484 of file clutchlog.h.
+Public Member Functions | color (ansi a, ground g) | | Constructor. More... | | Should return true if the underying representation encodes an existing color. More... | | | ||||||||||||||||||||||||
+Public Attributes
-ansi | mode | |
-enum clutchlog::fmt::color::ground | type | | ansi | mode | +enum clutchlog::fmt::color::ground | type | Type of color (foreground or background). | |||||||
+Public Typesenum class | ground { fore = 38
+, back = 48
} | | Codes for representing foreground or background. | | enum | ground { fore = 38, -back = 48 + | Codes for representing foreground or background. More... | ||||||
+Friends
-std::ostream & | operator<< (std::ostream &os, const color &c) | | Print the actually encoded escaped color sequence on the given stream. | | std::ostream & | operator<< (std::ostream &os, const color &c) | | Print the actually encoded escaped color sequence on the given stream. More... | | ||||||
Definition at line 498 of file clutchlog.h.
+ + + +
+
|
+ +pure virtual | +
Should return true if the underying representation encodes an existing color.
+ +Implemented in clutchlog::fmt::color_256, and clutchlog::fmt::color_16M.
+ +
+
|
+ +pure virtual | +
Should print the underlying representation on the given stream.
+ +Implemented in clutchlog::fmt::color_256, and clutchlog::fmt::color_16M.
+ +
+
|
+ +friend | +
Print the actually encoded escaped color sequence on the given stream.
+ +Definition at line 507 of file clutchlog.h.
+ +| ansi clutchlog::fmt::color::mode | +
Definition at line 485 of file clutchlog.h.
+ +
+
|
+ +strong | +
Codes for representing foreground or background.
+ +Definition at line 488 of file clutchlog.h.
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::color_16M, including all inherited members.
| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color | |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Abstract base class for 16M colors objects (24-bits ANSI).
+Abstract base class for 16M colors objects (24-bits ANSI).
-Definition at line 586 of file clutchlog.h.
+Definition at line 587 of file clutchlog.h.
+Public Member Functions | color_16M (ground t) | | |||||
| color_16M (ground t, const std::string &srgb) | |||||||
| Hex triplet string constructor. More... | |||||||
| -bool | is_set () const | ||||||
| Returns true if the underying representation encodes an existing color. | |||||||
| bool | is_set () const | ||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||
| Print the color RGB triplet on the given stream. | |||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||
| Print the color RGB triplet on the given stream. More... | |||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||
| color (ansi a, ground g) | |||||||
| Constructor. More... | |||||||
| virtual bool | is_set () const =0 | ||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||
| Should print the underlying representation on the given stream. More... | |||||||
+Public Attributesshort | red | | The encoded RGB indices. More... | short | green | short | blue | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | | |||||||||||||||||||||
Public Attributes inherited from clutchlog::fmt::color
+Additional Inherited Membersenum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||
Public Types inherited from clutchlog::fmt::colorDefinition at line 595 of file clutchlog.h.
+Definition at line 596 of file clutchlog.h.
Definition at line 604 of file clutchlog.h.
+Definition at line 605 of file clutchlog.h.
Definition at line 614 of file clutchlog.h.
+Definition at line 615 of file clutchlog.h.
-References red.
+References red.
+ +
+
|
+ +inlinevirtual | +
Returns true if the underying representation encodes an existing color.
+ +Implements clutchlog::fmt::color.
+ +Definition at line 637 of file clutchlog.h.
+ +References red.
+ +
+
|
+ +inlinevirtual | +
Print the color RGB triplet on the given stream.
+ +Implements clutchlog::fmt::color.
+ +Definition at line 640 of file clutchlog.h.
+ +References red.
The encoded RGB indices.
-"No color" is encoded as -1.
+"No color" is encoded as -1.
-Definition at line 590 of file clutchlog.h.
+Definition at line 591 of file clutchlog.h.
-Referenced by color_16M(), is_set(), and print_on().
+Referenced by color_16M(), is_set(), and print_on().
+ +| short clutchlog::fmt::color_16M::green | +
Definition at line 591 of file clutchlog.h.
+ +| short clutchlog::fmt::color_16M::blue | +
Definition at line 591 of file clutchlog.h.
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::color_256, including all inherited members.
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Abstract base class for 256 colors objects (8-bits ANSI).
+Abstract base class for 256 colors objects (8-bits ANSI).
-Definition at line 522 of file clutchlog.h.
+Definition at line 523 of file clutchlog.h.
+Public Member Functions | color_256 (ground t) | | |||||
| color_256 (ground t, const short i) | |||||||
| Constructor. More... | |||||||
| -bool | is_set () const | ||||||
| Returns true if the underying representation encodes an existing color. | |||||||
| bool | is_set () const | ||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||
| Print the color index on the given stream. | |||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||
| Print the color index on the given stream. More... | |||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||
| color (ansi a, ground g) | |||||||
| Constructor. More... | |||||||
| virtual bool | is_set () const =0 | ||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||
| Should print the underlying representation on the given stream. More... | |||||||
+Public Attributesshort | index | | The encoded color index in 4-bits ANSI. More... | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | | |||||||||||||
Public Attributes inherited from clutchlog::fmt::color
+Additional Inherited Membersenum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||
Public Types inherited from clutchlog::fmt::colorDefinition at line 531 of file clutchlog.h.
+Definition at line 532 of file clutchlog.h.
Definition at line 538 of file clutchlog.h.
+Definition at line 539 of file clutchlog.h.
+ +
+
|
+ +inlinevirtual | +
Returns true if the underying representation encodes an existing color.
+ +Implements clutchlog::fmt::color.
+ +Definition at line 542 of file clutchlog.h.
+ +References index.
+ +
+
|
+ +inlinevirtual | +
Print the color index on the given stream.
+ +Implements clutchlog::fmt::color.
+ +Definition at line 545 of file clutchlog.h.
+ +References index.
The encoded color index in 4-bits ANSI.
-"No color" is encoded as -1.
+"No color" is encoded as -1.
-Definition at line 526 of file clutchlog.h.
+Definition at line 527 of file clutchlog.h.
-Referenced by is_set(), and print_on().
+Referenced by is_set(), and print_on().
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::fg_16M, including all inherited members.
| blue (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_16M(ground t) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, short r, short g, short b) | clutchlog::fmt::color_16M | inline |
| color_16M(ground t, const std::string &srgb) | clutchlog::fmt::color_16M | inline |
| fg_16M() | clutchlog::fmt::fg_16M | inline |
| fg_16M() | clutchlog::fmt::fg_16M | inline |
| fg_16M(short r, short g, short b) | clutchlog::fmt::fg_16M | inline |
| fg_16M(const std::string &srgb) | clutchlog::fmt::fg_16M | inline |
| fg_16M(const std::string &srgb) | clutchlog::fmt::fg_16M | inline |
| fg_16M(const fg &) | clutchlog::fmt::fg_16M | inline |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| green (defined in clutchlog::fmt::color_16M) | clutchlog::fmt::color_16M | |
| ground enum name | clutchlog::fmt::color | |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| is_set() const | clutchlog::fmt::color_16M | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| print_on(std::ostream &os) const | clutchlog::fmt::color_16M | inlinevirtual |
| red | clutchlog::fmt::color_16M | |
| type | clutchlog::fmt::color | |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Foreground in 256-colors mode.
+Foreground in 256-colors mode.
-Definition at line 647 of file clutchlog.h.
+Definition at line 648 of file clutchlog.h.
+Public Member Functions
- | fg_16M () | | Empty constructor: no color. | | fg_16M () | | Numeric triplet constructor. More... | | Empty constructor: no color. More... | fg_16M (short r, short g, short b) | |||||||
| color_16M (ground t, const std::string &srgb) | |||||||||||||||||
| Hex triplet string constructor. More... | |||||||||||||||||
| -bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. | |||||||||||||||||
| bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||||||||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color RGB triplet on the given stream. | |||||||||||||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color RGB triplet on the given stream. More... | |||||||||||||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||||||||||||
| color (ansi a, ground g) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| virtual bool | is_set () const =0 | ||||||||||||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||||||||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||||||||||||
| Should print the underlying representation on the given stream. More... | |||||||||||||||||
+Additional Inherited Members Public Attributes inherited from clutchlog::fmt::color_16Mshort | red | | The encoded RGB indices. More... | short | green | short | blue | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | enum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||||||||||||||||||||||
Public Attributes inherited from clutchlog::fmt::color
Public Types inherited from clutchlog::fmt::color
+
|
+ +inline | +
Empty constructor: no color.
+ +Definition at line 650 of file clutchlog.h.
+ +Numeric triplet constructor.
-Parameters are expected to be in [0,255].
+Parameters are expected to be in [0,255].
| r | Red color component. | ||||||||||||||||||||||||||||||||||||||
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::fmt::fg_256, including all inherited members.
| color(ansi a, ground g) | clutchlog::fmt::color | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t) | clutchlog::fmt::color_256 | inline |
| color_256(ground t, const short i) | clutchlog::fmt::color_256 | inline |
| fg_256() | clutchlog::fmt::fg_256 | inline |
| fg_256() | clutchlog::fmt::fg_256 | inline |
| fg_256(const short f) | clutchlog::fmt::fg_256 | inline |
| fg_256(const fg &) | clutchlog::fmt::fg_256 | inline |
| fg_256(const fg &) | clutchlog::fmt::fg_256 | inline |
| ground enum name | clutchlog::fmt::color | |
| index | clutchlog::fmt::color_256 | |
| index | clutchlog::fmt::color_256 | |
| is_set() const | clutchlog::fmt::color_256 | inlinevirtual |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color | |
| mode (defined in clutchlog::fmt::color) | clutchlog::fmt::color | |
| print_on(std::ostream &os) const | clutchlog::fmt::color_256 | inlinevirtual |
| type | clutchlog::fmt::color |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
Foreground in 256-colors mode.
+Foreground in 256-colors mode.
-Definition at line 552 of file clutchlog.h.
+Definition at line 553 of file clutchlog.h.
+Public Member Functions
- | fg_256 () | | Empty constructor: no color. | | fg_256 () | | Constructor. More... | | Empty constructor: no color. More... | fg_256 (const short f) | |||||||
| color_256 (ground t, const short i) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| -bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. | |||||||||||||||||
| bool | is_set () const | ||||||||||||||||
| Returns true if the underying representation encodes an existing color. More... | |||||||||||||||||
| -std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color index on the given stream. | |||||||||||||||||
| std::ostream & | print_on (std::ostream &os) const | ||||||||||||||||
| Print the color index on the given stream. More... | |||||||||||||||||
Public Member Functions inherited from clutchlog::fmt::color | |||||||||||||||||
| color (ansi a, ground g) | |||||||||||||||||
| Constructor. More... | |||||||||||||||||
| virtual bool | is_set () const =0 | ||||||||||||||||
| Should return true if the underying representation encodes an existing color. More... | |||||||||||||||||
| virtual std::ostream & | print_on (std::ostream &os) const =0 | ||||||||||||||||
| Should print the underlying representation on the given stream. More... | |||||||||||||||||
+Additional Inherited Members Public Attributes inherited from clutchlog::fmt::color_256short | index | | The encoded color index in 4-bits ANSI. More... | | ansi | mode |
+enum clutchlog::fmt::color::ground | type | | Type of color (foreground or background). | | enum | ground { fore = 38,
-back = 48
+ | | Codes for representing foreground or background. More... | | | ||||||||||||||||||||||
Public Attributes inherited from clutchlog::fmt::color
Public Types inherited from clutchlog::fmt::color
+
|
+ +inline | +
Empty constructor: no color.
+ +Definition at line 555 of file clutchlog.h.
+ +Definition at line 560 of file clutchlog.h.
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
This is the complete list of members for clutchlog::scope_t, including all inherited members.
| matches | clutchlog::scope_t | |
| scope_t() | clutchlog::scope_t | inline |
| scope_t() | clutchlog::scope_t | inline |
| stage | clutchlog::scope_t | |
| there | clutchlog::scope_t | |
| there | clutchlog::scope_t |
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
#include <clutchlog.h>
Structure holding a location matching.
+Structure holding a location matching.
-Definition at line 1128 of file clutchlog.h.
+Definition at line 1130 of file clutchlog.h.
+Public Member Functions
- | scope_t () | | Constructor. | | scope_t () | | Constructor. More... | ||||||
+Public Attributes
-bool | matches | | Everything is compatible. | bool | matches | |
-level | stage | | Current log level. | level | stage | |
-bool | there | | Location is compatible. | bool | there | | Everything is compatible. More... | Current log level. More... | Location is compatible. More... | ||||||||||
+
|
+ +inline | +
Constructor.
+ +Definition at line 1142 of file clutchlog.h.
+ +| bool clutchlog::scope_t::matches | +
Everything is compatible.
+ +Definition at line 1132 of file clutchlog.h.
+ +Referenced by clutchlog::dump(), clutchlog::locate(), and clutchlog::log().
+ +| level clutchlog::scope_t::stage | +
Current log level.
+ +Definition at line 1134 of file clutchlog.h.
+ +Referenced by clutchlog::locate().
+ +| bool clutchlog::scope_t::there | +
Location is compatible.
+ +Definition at line 1140 of file clutchlog.h.
+ +Referenced by clutchlog::locate().
+ +|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
+ clutchlog 0.17
+
+ |
+
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|
|
- clutchlog
- 0.16
+
+ |
clutchlog 0.17
|