Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
spdlog::sinks::ansicolor_sink< Mutex > Class Template Reference

#include <ansicolor_sink.h>

Inheritance diagram for spdlog::sinks::ansicolor_sink< Mutex >:
Inheritance graph
[legend]

Public Member Functions

 ansicolor_sink (FILE *file)
 
void set_color (level::level_enum color_level, const std::string &color)
 
virtual ~ansicolor_sink ()
 
- Public Member Functions inherited from spdlog::sinks::base_sink< Mutex >
 base_sink ()
 
 base_sink (const base_sink &)=delete
 
void flush () SPDLOG_FINAL override
 
void log (const details::log_msg &msg) SPDLOG_FINAL override
 
base_sinkoperator= (const base_sink &)=delete
 
virtual ~base_sink ()=default
 
- Public Member Functions inherited from spdlog::sinks::sink
level::level_enum level () const
 
void set_level (level::level_enum log_level)
 
bool should_log (level::level_enum msg_level) const
 
 sink ()
 
virtual ~sink ()
 

Public Attributes

const std::string blink = "\033[5m"
 
const std::string blue = "\033[34m"
 
const std::string bold = "\033[1m"
 
const std::string concealed = "\033[8m"
 
const std::string cyan = "\033[36m"
 
const std::string dark = "\033[2m"
 
const std::string green = "\033[32m"
 
const std::string grey = "\033[30m"
 
const std::string magenta = "\033[35m"
 
const std::string on_blue = "\033[44m"
 
const std::string on_cyan = "\033[46m"
 
const std::string on_green = "\033[42m"
 
const std::string on_grey = "\033[40m"
 Background colors. More...
 
const std::string on_magenta = "\033[45m"
 
const std::string on_red = "\033[41m"
 
const std::string on_white = "\033[47m"
 
const std::string on_yellow = "\033[43m"
 
const std::string red = "\033[31m"
 
const std::string reset = "\033[00m"
 Formatting codes. More...
 
const std::string reverse = "\033[7m"
 
const std::string underline = "\033[4m"
 
const std::string white = "\033[37m"
 
const std::string yellow = "\033[33m"
 

Protected Member Functions

void _flush () override
 
virtual void _sink_it (const details::log_msg &msg) override
 

Protected Attributes

std::map< level::level_enum, std::string > colors_
 
bool should_do_colors_
 
FILE * target_file_
 
- Protected Attributes inherited from spdlog::sinks::base_sink< Mutex >
Mutex _mutex
 

Detailed Description

template<class Mutex>
class spdlog::sinks::ansicolor_sink< Mutex >

This sink prefixes the output with an ANSI escape sequence color code depending on the severity of the message. If no color terminal detected, omit the escape codes.

Definition at line 26 of file ansicolor_sink.h.

Constructor & Destructor Documentation

template<class Mutex >
spdlog::sinks::ansicolor_sink< Mutex >::ansicolor_sink ( FILE *  file)
inline

Definition at line 29 of file ansicolor_sink.h.

template<class Mutex >
virtual spdlog::sinks::ansicolor_sink< Mutex >::~ansicolor_sink ( )
inlinevirtual

Definition at line 40 of file ansicolor_sink.h.

Member Function Documentation

template<class Mutex >
void spdlog::sinks::ansicolor_sink< Mutex >::_flush ( )
inlineoverrideprotectedvirtual

Implements spdlog::sinks::base_sink< Mutex >.

Definition at line 99 of file ansicolor_sink.h.

template<class Mutex >
virtual void spdlog::sinks::ansicolor_sink< Mutex >::_sink_it ( const details::log_msg msg)
inlineoverrideprotectedvirtual

Implements spdlog::sinks::base_sink< Mutex >.

Definition at line 81 of file ansicolor_sink.h.

template<class Mutex >
void spdlog::sinks::ansicolor_sink< Mutex >::set_color ( level::level_enum  color_level,
const std::string &  color 
)
inline

Definition at line 45 of file ansicolor_sink.h.

Member Data Documentation

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::blink = "\033[5m"

Definition at line 56 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::blue = "\033[34m"

Definition at line 65 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::bold = "\033[1m"

Definition at line 53 of file ansicolor_sink.h.

template<class Mutex >
std::map<level::level_enum, std::string> spdlog::sinks::ansicolor_sink< Mutex >::colors_
protected

Definition at line 105 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::concealed = "\033[8m"

Definition at line 58 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::cyan = "\033[36m"

Definition at line 67 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::dark = "\033[2m"

Definition at line 54 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::green = "\033[32m"

Definition at line 63 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::grey = "\033[30m"

Definition at line 61 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::magenta = "\033[35m"

Definition at line 66 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_blue = "\033[44m"

Definition at line 75 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_cyan = "\033[46m"

Definition at line 77 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_green = "\033[42m"

Definition at line 73 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_grey = "\033[40m"

Background colors.

Definition at line 71 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_magenta = "\033[45m"

Definition at line 76 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_red = "\033[41m"

Definition at line 72 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_white = "\033[47m"

Definition at line 78 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::on_yellow = "\033[43m"

Definition at line 74 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::red = "\033[31m"

Definition at line 62 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::reset = "\033[00m"

Formatting codes.

Definition at line 52 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::reverse = "\033[7m"

Definition at line 57 of file ansicolor_sink.h.

template<class Mutex >
bool spdlog::sinks::ansicolor_sink< Mutex >::should_do_colors_
protected

Definition at line 104 of file ansicolor_sink.h.

template<class Mutex >
FILE* spdlog::sinks::ansicolor_sink< Mutex >::target_file_
protected

Definition at line 103 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::underline = "\033[4m"

Definition at line 55 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::white = "\033[37m"

Definition at line 68 of file ansicolor_sink.h.

template<class Mutex >
const std::string spdlog::sinks::ansicolor_sink< Mutex >::yellow = "\033[33m"

Definition at line 64 of file ansicolor_sink.h.


The documentation for this class was generated from the following file:


ros_opcua_impl_freeopcua
Author(s): Denis Štogl
autogenerated on Tue Jan 19 2021 03:12:10