clutchlog 0.17
clutchlog.h File Reference
#include <ciso646>
#include <filesystem>
#include <iterator>
#include <iostream>
#include <sstream>
#include <fstream>
#include <cassert>
#include <cstdlib>
#include <string>
#include <limits>
#include <regex>
#include <map>
+ Include dependency graph for clutchlog.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  clutchlog
 The single class which holds everything. More...
 
class  clutchlog::fmt
 Color and style formatter for ANSI terminal escape sequences. More...
 
struct  clutchlog::fmt::color
 Interface class for colors representation. More...
 
struct  clutchlog::fmt::color_256
 Abstract base class for 256 colors objects (8-bits ANSI). More...
 
struct  clutchlog::fmt::fg_256
 Foreground in 256-colors mode. More...
 
struct  clutchlog::fmt::bg_256
 Background in 256-colors mode. More...
 
struct  clutchlog::fmt::color_16M
 Abstract base class for 16M colors objects (24-bits ANSI). More...
 
struct  clutchlog::fmt::fg_16M
 Foreground in 256-colors mode. More...
 
struct  clutchlog::fmt::bg_16M
 background in 256-colors mode. More...
 
struct  clutchlog::scope_t
 Structure holding a location matching. More...
 

Macros

#define CLUTCHLOG_H
 Header guard. More...
 
#define CLUTCHLOG_HAVE_UNIX_SYSINFO   0
 True if POSIX headers necessary for stack depth management are available. More...
 
#define CLUTCHLOG_HAVE_UNIX_SYSIOCTL   0
 True if the system can handle the hfill feature. More...
 
#define WITH_CLUTCHLOG
 Actually enable clutchlog features. More...
 
#define CLUTCHLOG_DEFAULT_DEPTH_BUILT_NODEBUG   clutchlog::level::progress
 Default level over which calls to the logger are optimized out when NDEBUG is defined. More...
 
#define CLUTCHLOC   __FILE__, __FUNCTION__, __LINE__
 Handy shortcuts to location. More...
 
#define CLUTCHLOGD(LEVEL, WHAT, DEPTH_DELTA)
 Log a message at the given level and with a given depth delta. More...
 
#define CLUTCHLOG(LEVEL, WHAT)    CLUTCHLOGD(LEVEL, WHAT, 0)
 Log a message at the given level. More...
 
#define CLUTCHDUMP(LEVEL, CONTAINER, FILENAME)
 Dump the given container. More...
 
#define CLUTCHFUNC(LEVEL, FUNC, ...)
 Call any function if the scope matches. More...
 
#define CLUTCHCODE(LEVEL, ...)
 Run any code if the scope matches. More...
 
Default configuration members
#define CLUTCHLOG_DEFAULT_FORMAT   "{level_letter} {msg}\t\t\t\t\t{func} @ {file}:{line}\n"
 
#define CLUTCHDUMP_DEFAULT_FORMAT   "# {level} in {func} @ {file}:{line}"
 Compile-time default format of the comment line in file dump. More...
 
#define CLUTCHDUMP_DEFAULT_SEP   "\n"
 Compile-time default item separator for dump. More...
 
#define CLUTCHLOG_DEFAULT_DEPTH_MARK   ">"
 Compile-time default mark for stack depth. More...
 
#define CLUTCHLOG_STRIP_CALLS   5
 Compile-time number of call stack levels to remove from depth display by default. More...
 
#define CLUTCHLOG_DEFAULT_HFILL_MARK   '.'
 Character used as a filling for right-align the right part of messages with "{hfill}". More...
 

Macro Definition Documentation

◆ CLUTCHLOG_H

#define CLUTCHLOG_H

Header guard.

Definition at line 4 of file clutchlog.h.

◆ CLUTCHLOG_HAVE_UNIX_SYSINFO

#define CLUTCHLOG_HAVE_UNIX_SYSINFO   0

True if POSIX headers necessary for stack depth management are available.

Definition at line 34 of file clutchlog.h.

◆ CLUTCHLOG_HAVE_UNIX_SYSIOCTL

#define CLUTCHLOG_HAVE_UNIX_SYSIOCTL   0

True if the system can handle the hfill feature.

Definition at line 44 of file clutchlog.h.

◆ WITH_CLUTCHLOG

#define WITH_CLUTCHLOG

Actually enable clutchlog features.

Definition at line 54 of file clutchlog.h.