From 5c68a0251f0e6d3fb8375caeeff7fc246bb7a14a Mon Sep 17 00:00:00 2001 From: nojhan Date: Wed, 18 Jan 2023 22:36:54 +0100 Subject: [PATCH] bump to v0.11 --- CMakeLists.txt | 6 +- README.md | 3 +- docs/annotated.html | 4 +- docs/classclutchlog-members.html | 90 +- docs/classclutchlog.html | 511 +++-- docs/classclutchlog_1_1fmt-members.html | 23 +- docs/classclutchlog_1_1fmt.html | 192 +- docs/classes.html | 2 +- docs/clutchlog_8h.html | 26 +- docs/clutchlog_8h_source.html | 1950 +++++++++-------- .../dir_0597ce40fdf188e7870807c32590691d.html | 2 +- .../dir_084dfc9a5a5be3c9e27543ac1f550db2.html | 2 +- .../dir_0c6859326e57c84153d9ce3980c7b614.html | 2 +- .../dir_10ddb028b6670bd8aa01364e6cad76a9.html | 2 +- .../dir_10e5b046fa80f4154fb6ef98b74319ee.html | 2 +- .../dir_11d96b0893f97b142d6effd564752a90.html | 2 +- .../dir_13368ad9184bbad1002e036a402da7c4.html | 2 +- .../dir_14f0b626af56b1ff4afcbb0dad5c9b00.html | 2 +- .../dir_178d547a078d4731b3af021ed5ed0bd5.html | 2 +- .../dir_183919ee65eb1ce3e4c28765d02d1592.html | 2 +- .../dir_2010fee6dc55af84ec3880814fe9859d.html | 2 +- .../dir_232d0e660737fa098457ae695f029c6e.html | 2 +- .../dir_27117ea8c3a88700c8b1db11c9562238.html | 2 +- .../dir_2c58f47b9ec63c233e9a6dc44b0220ce.html | 2 +- .../dir_3353b0403823e43b133a3a97f7b61528.html | 2 +- .../dir_3354f823b93c486985d8eff812f202d0.html | 2 +- .../dir_3580e889fffd597e9f1e74f0989be3f4.html | 2 +- .../dir_38468fa15d001d8f53eb5a2cc819fc4d.html | 2 +- .../dir_3b27b7a7434122ddfe41170c43d31183.html | 2 +- .../dir_3b3b5af829689cf9fc261f0e6a0edda6.html | 2 +- .../dir_3e1bb72ed66f215303e7248107b2c843.html | 2 +- .../dir_3e4d9bbf23e4011a0d79c59ef1fbe4fa.html | 2 +- .../dir_44d46ce0fefad9fb4568613342a0f089.html | 2 +- .../dir_49bf50162b43c6eb0e5d51c9a154dd85.html | 2 +- .../dir_56412180890141897a46e337654f67d2.html | 2 +- .../dir_56a467a6a3c52bfafa193ec205c1fdda.html | 2 +- .../dir_581e3e812319f368929566c0af58ce01.html | 2 +- .../dir_59425e443f801f1f2fd8bbe4959a3ccf.html | 4 +- ...r_59425e443f801f1f2fd8bbe4959a3ccf_dep.map | 2 +- ...r_59425e443f801f1f2fd8bbe4959a3ccf_dep.md5 | 2 +- .../dir_5b4d8a0ca6574b7df09df571ad9e67b6.html | 2 +- .../dir_61ab004aa8225a3da30151b57198e21f.html | 2 +- .../dir_758abd5d6f4fa812820adbe21fc77736.html | 2 +- .../dir_7993767c315ca7e2492c0e12f2140894.html | 2 +- .../dir_7ac2ccaca1f97cd5484903d036e6e018.html | 2 +- .../dir_7bfd87e22fd8913a7cdac6885aea0fda.html | 2 +- .../dir_7cb602820ef60ce7eb9af6d9eb8de17a.html | 2 +- .../dir_818a2d2dcebf5fa9f09b2ff370a5de12.html | 2 +- .../dir_8497d690b57aba136d1839e5c427d666.html | 2 +- .../dir_894f8a189fd86151cf73b234a425a3d7.html | 2 +- .../dir_8a6224de47695006c09a16d36b73e641.html | 2 +- .../dir_8c3cbcfef903547985c71f28526a37d7.html | 2 +- .../dir_99be30a3dc5b3fd221ff5ea6bdbc52f4.html | 2 +- .../dir_99f269110bdc8201794420d5043dadef.html | 2 +- .../dir_9a935cfcf36ab9c047ca734a48c6ea47.html | 2 +- .../dir_a5e190e82988878b02be1ad8893fe33a.html | 2 +- .../dir_a6147547081efd8e9250c1acee302c56.html | 2 +- .../dir_a808995e8af62dcd5e402dfccd15597d.html | 2 +- .../dir_a943a781f3047d1fe445d5e8eba50028.html | 2 +- .../dir_b1c763aea5b862e235cc9501e2ce06da.html | 2 +- .../dir_b2c0fc6d3625db437ca13cb01c2a2d25.html | 2 +- .../dir_be65af4ad555fa38f52fdec43511df23.html | 2 +- .../dir_bf56be71754e1b48f8f3e417eb89bb69.html | 2 +- .../dir_c318bd5cf14aaa5601e6029e0b5b4048.html | 2 +- .../dir_c6d9c1238235b0a4853a9dfbf2961dcc.html | 2 +- .../dir_c9d710504e3415cd6c2884f7df804eda.html | 2 +- .../dir_dd500134467ec65427366f3cbbc5ff81.html | 2 +- .../dir_de06b53c2e04c67b773395f92873ff7f.html | 2 +- .../dir_e486d5210108a359e139a984535147fa.html | 2 +- .../dir_ec4f48f1c0ac567d297185d46cf69b0c.html | 2 +- .../dir_ede0e87241159758c1b375c196bd55d8.html | 2 +- .../dir_f324b8056e3921282ea6aa7d15c7705c.html | 2 +- .../dir_f544411fb6a30872da080b65ab4522b8.html | 2 +- .../dir_f792a45ec812fbfe638a4ac0a7328817.html | 2 +- .../dir_f803ec176eda9a8494dc55dc57236527.html | 2 +- docs/files.html | 2 +- docs/functions.html | 103 +- docs/functions_enum.html | 10 +- docs/functions_func.html | 45 +- docs/functions_rela.html | 4 +- docs/functions_vars.html | 50 +- docs/globals.html | 22 +- docs/globals_defs.html | 22 +- docs/graph_legend.html | 2 +- docs/group__DefaultConfigMacros.html | 599 ++++- docs/group__Formating.html | 13 +- docs/group__Formating.map | 4 +- docs/group__Formating.md5 | 2 +- docs/group__Formating.png | Bin 3671 -> 4030 bytes docs/group__Main.html | 8 +- docs/group__UseMacros.html | 612 +----- docs/index.html | 118 +- docs/modules.html | 12 +- docs/search/all_0.js | 22 +- docs/search/all_1.js | 4 +- docs/search/all_2.js | 20 +- docs/search/all_3.js | 18 +- docs/search/all_4.js | 16 +- docs/search/all_5.js | 2 +- docs/search/all_6.js | 16 +- docs/search/all_7.js | 4 +- docs/search/all_8.js | 6 +- docs/search/all_9.js | 2 +- docs/search/all_a.js | 2 +- docs/search/all_b.js | 7 +- docs/search/all_c.js | 6 +- docs/search/all_d.js | 2 +- docs/search/classes_0.js | 2 +- docs/search/classes_1.js | 2 +- docs/search/classes_2.js | 2 +- docs/search/defines_0.js | 4 +- docs/search/defines_1.js | 2 +- docs/search/enums_0.js | 2 +- docs/search/enums_1.js | 2 +- docs/search/enums_2.js | 2 +- docs/search/enums_3.js | 2 +- docs/search/files_0.js | 2 +- docs/search/functions_0.js | 2 +- docs/search/functions_1.js | 10 +- docs/search/functions_2.js | 14 +- docs/search/functions_3.js | 4 +- docs/search/functions_4.js | 2 +- docs/search/functions_5.js | 2 +- docs/search/functions_6.js | 5 +- docs/search/functions_7.js | 2 +- docs/search/groups_0.js | 2 +- docs/search/groups_1.js | 2 +- docs/search/groups_2.js | 2 +- docs/search/groups_3.js | 2 +- docs/search/pages_0.js | 2 +- docs/search/related_0.js | 2 +- docs/search/variables_0.js | 22 +- docs/search/variables_1.js | 2 +- docs/search/variables_2.js | 14 +- docs/search/variables_3.js | 2 +- docs/search/variables_4.js | 2 +- docs/search/variables_5.js | 4 +- docs/search/variables_6.js | 2 +- docs/structclutchlog_1_1scope__t-members.html | 10 +- docs/structclutchlog_1_1scope__t.html | 36 +- 140 files changed, 2576 insertions(+), 2287 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1e87cb..0d4539d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,19 +6,19 @@ cmake_minimum_required(VERSION 3.10 FATAL_ERROR) project("clutchlog" - VERSION 0.10 + VERSION 0.11 DESCRIPTION "A logging system which targets versatile debugging") enable_language(CXX) # C++ set(CMAKE_CXX_STANDARD 17) -if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") +if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -pedantic -std=c++17 -lstdc++fs") if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 6.0 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0) link_libraries(stdc++fs) add_compile_definitions(FSEXPERIMENTAL) endif() -endif() +endif() ###################################################################################### diff --git a/README.md b/README.md index 88733e9..578f04b 100644 --- a/README.md +++ b/README.md @@ -190,7 +190,8 @@ Available tags are: - `{level_letter}`: the first letter of the current log level, - `{file}`: the current file (absolute path), - `{func}`: the current function, -- `{line}`: the current line number. +- `{line}`: the current line number, +- `{level_fmt}`: the format of the current level (i.e. configured with `clutchlog::style`). Some tags are only available on POSIX operating systems as of now: - `{name}`: the name of the current binary, diff --git a/docs/annotated.html b/docs/annotated.html index d1602d8..7884bea 100644 --- a/docs/annotated.html +++ b/docs/annotated.html @@ -22,7 +22,7 @@
clutchlog -  0.10 +  0.11
@@ -68,7 +68,7 @@ $(function() {
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12]
- +
 Cclutchlog
 CclutchlogThe single class which holds everything
 CfmtColor and style formatter for ANSI terminal escape sequences
 Cscope_tStructure holding a location matching
diff --git a/docs/classclutchlog-members.html b/docs/classclutchlog-members.html index 8902b65..45de837 100644 --- a/docs/classclutchlog-members.html +++ b/docs/classclutchlog-members.html @@ -22,7 +22,7 @@
clutchlog -  0.10 +  0.11
@@ -69,58 +69,58 @@ $(function() {

This is the complete list of members for clutchlog, including all inherited members.

- - - - - - - - - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - + + + + + + + + - - + + - - - - - - - - + + + + + + + +
_format_dumpclutchlogprotected
_format_logclutchlogprotected
_in_fileclutchlogprotected
_in_funcclutchlogprotected
_in_lineclutchlogprotected
_level_fmtclutchlogprotected
_level_wordclutchlogprotected
_outclutchlogprotected
_stageclutchlogprotected
_strip_callsclutchlogprotected
_word_levelclutchlogprotected
_format_dumpclutchlogprotected
_format_logclutchlogprotected
_in_fileclutchlogprotected
_in_funcclutchlogprotected
_in_lineclutchlogprotected
_level_fmtclutchlogprotected
_level_wordclutchlogprotected
_outclutchlogprotected
_stageclutchlogprotected
_strip_callsclutchlogprotected
_word_levelclutchlogprotected
clutchlog(clutchlog const &)=delete (defined in clutchlog)clutchlog
critical enum value (defined in clutchlog)clutchlog
debug enum value (defined in clutchlog)clutchlog
default_depth_markclutchloginlineprotectedstatic
default_formatclutchloginlineprotectedstatic
default_hfill_charclutchloginlineprotectedstatic
default_hfill_maxclutchloginlineprotectedstatic
default_strip_callsclutchloginlineprotectedstatic
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) constclutchloginline
dump_default_formatclutchloginlineprotectedstatic
dump_default_sepclutchloginlineprotectedstatic
default_depth_markclutchloginlineprotectedstatic
default_formatclutchloginlineprotectedstatic
default_hfill_charclutchloginlineprotectedstatic
default_hfill_maxclutchloginlineprotectedstatic
default_strip_callsclutchloginlineprotectedstatic
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) constclutchloginline
dump_default_formatclutchloginlineprotectedstatic
dump_default_sepclutchloginlineprotectedstatic
error enum value (defined in clutchlog)clutchlog
file(std::string file)clutchloginline
format(const std::string &format)clutchloginline
format() constclutchloginline
format(std::string format, const std::string &what, const level &stage, const std::string &file, const std::string &func, const size_t line) constclutchloginline
format_comment(const std::string &format)clutchloginline
format_comment() constclutchloginline
func(std::string func)clutchloginline
file(std::string file)clutchloginline
format(const std::string &format)clutchloginline
format() constclutchloginline
format(std::string row, const std::string &what, const level &stage, const std::string &file, const std::string &func, const size_t line) constclutchloginline
format_comment(const std::string &format)clutchloginline
format_comment() constclutchloginline
func(std::string func)clutchloginline
info enum value (defined in clutchlog)clutchlog
level enum nameclutchlog
level_of(const std::string name)clutchloginline
levels() constclutchloginline
line(std::string line)clutchloginline
locate(const level &stage, const std::string &file, const std::string &func, const size_t line) constclutchloginline
location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*")clutchloginline
log(const level &stage, const std::string &what, const std::string &file, const std::string &func, size_t line) constclutchloginline
logger()clutchloginlinestatic
level enum nameclutchlog
level_of(const std::string name)clutchloginline
levels() constclutchloginline
line(std::string line)clutchloginline
locate(const level &stage, const std::string &file, const std::string &func, const size_t line) constclutchloginline
location(const std::string &in_file, const std::string &in_function=".*", const std::string &in_line=".*")clutchloginline
log(const level &stage, const std::string &what, const std::string &file, const std::string &func, size_t line) constclutchloginline
logger()clutchloginlinestatic
note enum value (defined in clutchlog)clutchlog
operator=(clutchlog const &)=delete (defined in clutchlog)clutchlog
out(std::ostream &out)clutchloginline
out()clutchloginline
out(std::ostream &out)clutchloginline
out()clutchloginline
progress enum value (defined in clutchlog)clutchlog
replace(const std::string &form, const std::string &mark, const std::string &tag) constclutchloginline
replace(const std::string &form, const std::string &mark, const size_t tag) constclutchloginline
style(level stage, FMT... styles)clutchloginline
style(level stage, fmt style)clutchloginline
style(level stage) constclutchloginline
threshold(level l)clutchloginline
threshold(const std::string &l)clutchloginline
threshold() constclutchloginline
replace(const std::string &form, const std::string &mark, const std::string &tag) constclutchloginline
replace(const std::string &form, const std::string &mark, const size_t tag) constclutchloginline
style(level stage, FMT... styles)clutchloginline
style(level stage, fmt style)clutchloginline
style(level stage) constclutchloginline
threshold(level l)clutchloginline
threshold(const std::string &l)clutchloginline
threshold() constclutchloginline
warning enum value (defined in clutchlog)clutchlog
xdebug enum value (defined in clutchlog)clutchlog
diff --git a/docs/classclutchlog.html b/docs/classclutchlog.html index 0196391..e171444 100644 --- a/docs/classclutchlog.html +++ b/docs/classclutchlog.html @@ -22,7 +22,7 @@
clutchlog -  0.10 +  0.11
@@ -64,12 +64,16 @@ $(function() {
+ +

The single class which holds everything. + More...

+ +

#include <clutchlog.h>

@@ -83,137 +87,138 @@ Classes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + +

Classes

Public Member Functions

Configuration accessors
-void format (const std::string &format)
 Set the template string.
 
-std::string format () const
 Get the template string.
 
-void format_comment (const std::string &format)
 Set the template string for dumps.
 
-std::string format_comment () const
 Get the template string for dumps.
 
-void out (std::ostream &out)
 Set the output stream on which to print.
 
-std::ostream & out ()
 Get the output stream on which to print.
 
-void threshold (level l)
 Set the log level (below which logs are not printed) with an identifier.
 
-void threshold (const std::string &l)
 Set the log level (below which logs are not printed) with a string.
 
-level threshold () const
 Get the log level below which logs are not printed.
 
-const std::map< std::string, level > & levels () const
 Get the map of available log levels string representations toward their identifier. *‍/.
 
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 func (std::string func)
 Set the regular expression filtering the function location.
 
-void line (std::string line)
 Set the regular expression filtering the line 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.
 
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.
 
-fmt style (level stage) const
 Get the configured fmt instance of the given log level.
 
+void format (const std::string &format)
 Set the template string.
 
+std::string format () const
 Get the template string.
 
+void format_comment (const std::string &format)
 Set the template string for dumps.
 
+std::string format_comment () const
 Get the template string for dumps.
 
+void out (std::ostream &out)
 Set the output stream on which to print.
 
+std::ostream & out ()
 Get the output stream on which to print.
 
+void threshold (level l)
 Set the log level (below which logs are not printed) with an identifier.
 
+void threshold (const std::string &l)
 Set the log level (below which logs are not printed) with a string.
 
+level threshold () const
 Get the log level below which logs are not printed.
 
+const std::map< std::string, level > & levels () const
 Get the map of available log levels string representations toward their identifier. *‍/.
 
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 func (std::string func)
 Set the regular expression filtering the function location.
 
+void line (std::string line)
 Set the regular expression filtering the line 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.
 
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.
 
+fmt style (level stage) const
 Get the configured fmt instance of the given log level.
 
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.
 
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 format (std::string format, 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.
 
-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.
 
+
+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.
 
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 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.
 
+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.
 
template<class In >
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.
 
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.
 
- - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + +

Static Protected Attributes

-static std::string default_format = CLUTCHLOG_DEFAULT_FORMAT
 Default format of the messages.
 
-static std::string dump_default_format = CLUTCHDUMP_DEFAULT_FORMAT
 Default format of the comment line in file dump.
 
-static std::string dump_default_sep = CLUTCHDUMP_DEFAULT_SEP
 Default item separator for dump.
 
-static std::string default_depth_mark = CLUTCHLOG_DEFAULT_DEPTH_MARK
 Default mark for stack depth.
 
-static unsigned int default_strip_calls = CLUTCHLOG_STRIP_CALLS
 Number of call stack levels to remove from depth display by default.
 
-static char default_hfill_char = CLUTCHLOG_HFILL_MARK
 Default character used as a filling for right-align the right part of messages with "{hfill}".
 
-static unsigned short default_hfill_max = CLUTCHLOG_HFILL_MAX
 Default maximum number of character used as a filling for right-align the right part of messages with "{hfill}".
 
Default configuration members
+static std::string default_format = CLUTCHLOG_DEFAULT_FORMAT
 Default format of the messages.
 
+static std::string dump_default_format = CLUTCHDUMP_DEFAULT_FORMAT
 Default format of the comment line in file dump.
 
+static std::string dump_default_sep = CLUTCHDUMP_DEFAULT_SEP
 Default item separator for dump.
 
+static std::string default_depth_mark = CLUTCHLOG_DEFAULT_DEPTH_MARK
 Default mark for stack depth.
 
+static unsigned int default_strip_calls = CLUTCHLOG_STRIP_CALLS
 Number of call stack levels to remove from depth display by default.
 
+static char default_hfill_char = CLUTCHLOG_HFILL_MARK
 Default character used as a filling for right-align the right part of messages with "{hfill}".
 
+static size_t default_hfill_max = CLUTCHLOG_HFILL_MAX
 Default maximum number of character used as a filling for right-align the right part of messages with "{hfill}".
 
-xdebug =7
} - - - - - + + + + +

High-level API

enum  level {
+
enum  level {
  critical =0, error =1, warning =2, @@ -225,69 +230,219 @@ High-level API
 Available log levels.
 
static clutchloglogger ()
 Get the logger instance. More...
 
 Available log levels.
 
static clutchloglogger ()
 Get the logger instance. More...
 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - +

Internal details

-size_t _strip_calls
 Current number of call stack levels to remove from depth display.
 
-const std::map< level, std::string > _level_word
 Dictionary of level identifier to their string representation.
 
-std::map< std::string, level_word_level
 Dictionary of level string to their identifier.
 
-std::map< level, fmt_level_fmt
 Dictionary of level identifier to their format.
 
-std::string _format_log
 Current format of the standard output.
 
-std::string _format_dump
 Current format of the file output.
 
-std::ostream * _out
 Standard output.
 
-level _stage
 Current log level.
 
-std::regex _in_file
 Current file location filter.
 
-std::regex _in_func
 Current function location filter.
 
-std::regex _in_line
 Current line location filter.
 
+
+size_t _strip_calls
 Current number of call stack levels to remove from depth display.
 
+const std::map< level, std::string > _level_word
 Dictionary of level identifier to their string representation.
 
+std::map< std::string, level_word_level
 Dictionary of level string to their identifier.
 
+std::map< level, fmt_level_fmt
 Dictionary of level identifier to their format.
 
+std::string _format_log
 Current format of the standard output.
 
+std::string _format_dump
 Current format of the file output.
 
+std::ostream * _out
 Standard output.
 
+level _stage
 Current log level.
 
+std::regex _in_file
 Current file location filter.
 
+std::regex _in_func
 Current function location filter.
 
+std::regex _in_line
 Current line location filter.
 
 clutchlog (clutchlog const &)=delete
 
+
 
void operator= (clutchlog const &)=delete
 
 
+

Detailed Description

+

The single class which holds everything.

+

This is a Singleton class.

+

Member Function Documentation

+ +

◆ level_of()

+ +
+
+ + + + + +
+ + + + + + + + +
level clutchlog::level_of (const std::string name)
+
+inline
+
+ +

Return the log level tag corresponding to the given pre-configured name.

+
Note
This is case sensitive, see the pre-configured _level_word.
+ +
+
+ +

◆ logger()

+ +
+
+ + + + + +
+ + + + + + + +
static clutchlog& clutchlog::logger ()
+
+inlinestatic
+
+ +

Get the logger instance.

+
+
+
+
+ +

◆ replace()

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + +
std::string clutchlog::replace (const std::string & form,
const std::string & mark,
const std::string & tag 
) const
+
+inline
+
+ +

Replace mark by tag in form.

+
log.replace("{greet} {world}", "\\{greet\\}", "hello");
+
// returns "hello {world}"
+
+
+
+ +

◆ style()

+ +
+
+
+template<class ... FMT>
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
void clutchlog::style (level stage,
FMT... styles 
)
+
+inline
+
+ +

Set the style (color and typo) of the given log level.

+

This version accept style arguments as if they were passed to clutchlog::fmt.

+ +
+

The documentation for this class was generated from the following file:
+
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.
Definition: clutchlog.h:883
+
static clutchlog & logger()
Get the logger instance.
Definition: clutchlog.h:291