A AnsiLogger that logs all messages to std::cout. The name of the Logger defaults to "ANSI_CONSOLE".
Definition at line 219 of file ansilogger.hpp.
#include <ansilogger.hpp>
Public Method Index: | |
| AnsiConsoleLogger (const NString &name=nullptr) | |
| virtual | ~AnsiConsoleLogger () override |
| Destructs an AnsiConsoleLogger. | |
| Public Method Index: inherited from alib::lox::loggers::AnsiLogger | |
| AnsiLogger (std::ostream &pOStream=std::cout, const NString &name=nullptr, const NString &typeName="ANSI") | |
| virtual | ~AnsiLogger () override |
| Destructs an AnsiLogger. | |
| Public Method Index: inherited from alib::lox::textlogger::TextLogger | |
| virtual | ~TextLogger () override |
| Destructs a TextLogger. | |
| virtual void | ClearReplacements () |
| Removes all pairs of searched strings and their replacement value. | |
| FormatAutoSizes & | GetAutoSizes () |
| FormatDateTime & | GetFormatDate () |
| FormatMetaInfo & | GetFormatMetaInfo () |
| FormatMultiLine & | GetFormatMultiLine () |
| FormatOther & | GetFormatOther () |
| FormatTimeDiff & | GetFormatTimeDiff () |
| Replacements & | GetReplacements () |
| virtual void | Log (detail::Domain &domain, Verbosity verbosity, BoxesMA &logables, detail::ScopeInfo &scope) override |
| virtual void | ResetAutoSizes () |
| virtual void | SetReplacement (const String &searched, const String &replacement) |
| Public Method Index: inherited from alib::lox::detail::Logger | |
| virtual | ~Logger () override |
| Destructs a logger. | |
| const NString & | GetName () const |
| const NString & | GetTypeName () const |
| Public Method Index: inherited from alib::threads::RecursiveLock | |
| void | AcquireRecursive (ALIB_DBG_TAKE_CI) |
| virtual bool | DCSIsAcquired () const override |
| virtual bool | DCSIsSharedAcquired () const override |
| void | ReleaseRecursive (ALIB_DBG_TAKE_CI) |
| bool | TryAcquire (ALIB_DBG_TAKE_CI) |
| Public Method Index: inherited from alib::lang::DbgCriticalSections::AssociatedLock | |
| virtual | ~AssociatedLock () |
| Virtual Destructor. | |
Additional Inherited Members | |
| Public Static Field Index: inherited from alib::lox::loggers::AnsiLogger | |
| static constexpr character | ANSI_BG_BLACK [6] { A_CHAR("\033[40m") } |
| Select black as background color. | |
| static constexpr character | ANSI_BG_BLUE [6] { A_CHAR("\033[44m") } |
| Select blue as background color. | |
| static constexpr character | ANSI_BG_CYAN [6] { A_CHAR("\033[46m") } |
| Select cyan as background color. | |
| static constexpr character | ANSI_BG_GRAY [12] { A_CHAR("\033[48;5;240m")} |
| Select gray as background color. | |
| static constexpr character | ANSI_BG_GREEN [6] { A_CHAR("\033[42m") } |
| Select green as background color. | |
| static constexpr character | ANSI_BG_LIGHT_BLUE [11] { A_CHAR("\033[48;5;12m") } |
| Select light blue as background color. | |
| static constexpr character | ANSI_BG_LIGHT_CYAN [11] { A_CHAR("\033[48;5;14m") } |
| Select light cyan as background color. | |
| static constexpr character | ANSI_BG_LIGHT_GRAY [12] { A_CHAR("\033[48;5;250m")} |
| Select light gray as background color. | |
| static constexpr character | ANSI_BG_LIGHT_GREEN [11] { A_CHAR("\033[48;5;10m") } |
| Select light green as background color. | |
| static constexpr character | ANSI_BG_LIGHT_MAGENTA [11] { A_CHAR("\033[48;5;13m") } |
| Select light magenta as background color. | |
| static constexpr character | ANSI_BG_LIGHT_RED [11] { A_CHAR("\033[48;5;09m") } |
| Select light red as background color. | |
| static constexpr character | ANSI_BG_LIGHT_STD_COL [6] { A_CHAR("\033[49m") } |
| Select standard background color. | |
| static constexpr character | ANSI_BG_LIGHT_YELLOW [11] { A_CHAR("\033[48;5;11m") } |
| Select light yellow as background color. | |
| static constexpr character | ANSI_BG_MAGENTA [6] { A_CHAR("\033[45m") } |
| Select magenta as background color. | |
| static constexpr character | ANSI_BG_RED [6] { A_CHAR("\033[41m") } |
| Select red as background color. | |
| static constexpr character | ANSI_BG_STD_COL [6] { A_CHAR("\033[49m") } |
| Select standard background color. | |
| static constexpr character | ANSI_BG_WHITE [11] { A_CHAR("\033[48;5;15m") } |
| Select white as background color. | |
| static constexpr character | ANSI_BG_YELLOW [6] { A_CHAR("\033[43m") } |
| Select yellow as background color. | |
| static constexpr character | ANSI_BLACK [6] { A_CHAR("\033[30m") } |
| Select black as foreground color. | |
| static constexpr character | ANSI_BLUE [6] { A_CHAR("\033[34m") } |
| Select blue as foreground color. | |
| static constexpr character | ANSI_BOLD [5] { A_CHAR("\033[1m") } |
| Select bold font style. | |
| static constexpr character | ANSI_CYAN [6] { A_CHAR("\033[36m") } |
| Select cyan as foreground color. | |
| static constexpr character | ANSI_GRAY [12] { A_CHAR("\033[38;5;240m")} |
| Select gray as foreground color. | |
| static constexpr character | ANSI_GREEN [6] { A_CHAR("\033[32m") } |
| Select green as foreground color. | |
| static constexpr character | ANSI_ITALICS [5] { A_CHAR("\033[3m") } |
| Select italics font style. | |
| static constexpr character | ANSI_LIGHT_BLUE [11] { A_CHAR("\033[38;5;12m") } |
| Select light blue as foreground color. | |
| static constexpr character | ANSI_LIGHT_CYAN [11] { A_CHAR("\033[38;5;14m") } |
| Select light cyan as foreground color. | |
| static constexpr character | ANSI_LIGHT_GRAY [12] { A_CHAR("\033[38;5;250m")} |
| Select light gray as foreground color. | |
| static constexpr character | ANSI_LIGHT_GREEN [11] { A_CHAR("\033[38;5;10m") } |
| Select light green as foreground color. | |
| static constexpr character | ANSI_LIGHT_MAGENTA [11] { A_CHAR("\033[38;5;13m") } |
| Select light magenta as foreground color. | |
| static constexpr character | ANSI_LIGHT_RED [11] { A_CHAR("\033[38;5;09m") } |
| Select light red as foreground color. | |
| static constexpr character | ANSI_LIGHT_STD_COL [6] { A_CHAR("\033[39m") } |
| Select standard foreground color. | |
| static constexpr character | ANSI_LIGHT_YELLOW [11] { A_CHAR("\033[38;5;11m") } |
| Select light yellow as foreground color. | |
| static constexpr character | ANSI_MAGENTA [6] { A_CHAR("\033[35m") } |
| Select magenta as foreground color. | |
| static constexpr character | ANSI_RED [6] { A_CHAR("\033[31m") } |
| Select red as foreground color. | |
| static constexpr character | ANSI_RESET [5] { A_CHAR("\033[0m") } |
| Reset colors and font style. | |
| static constexpr character | ANSI_STD_COL [6] { A_CHAR("\033[39m") } |
| Select standard foreground color. | |
| static constexpr character | ANSI_STD_STYLE [5] { A_CHAR("\033[0m") } |
| Select standard font style. | |
| static constexpr character | ANSI_WHITE [11] { A_CHAR("\033[38;5;15m") } |
| Select white as foreground color. | |
| static constexpr character | ANSI_YELLOW [6] { A_CHAR("\033[33m") } |
| Select yellow as foreground color. | |
| Public Field Index: inherited from alib::lox::loggers::AnsiLogger | |
| textlogger::ColorfulLoggerParameters | CFP |
| Public Field Index: inherited from alib::lox::textlogger::TextLogger | |
| ObjectConverter * | Converter = nullptr |
| TickConverter | DateConverter |
| bool | FormatWarningOnce =false |
| Public Field Index: inherited from alib::lox::detail::Logger | |
| integer | CntLogs =0 |
| time::Ticks | TimeOfCreation |
| The creation time of the Logger. | |
| time::Ticks | TimeOfLastLog |
| Timestamp of the last log operation. | |
| Public Field Index: inherited from alib::threads::RecursiveLock | |
| DbgLockAsserter | Dbg |
| The debug tool instance. | |
| Protected Field Index: inherited from alib::lox::loggers::AnsiLogger | |
| std::ostream & | os |
| The output stream to use, provided with construction. | |
| Protected Field Index: inherited from alib::lox::textlogger::TextLogger | |
| strings::util::CalendarDateTime | callerDateTime |
| AString | logBuf |
| The internal log Buffer. | |
| AString | msgBuf |
| The buffer for converting the logables. | |
| Variable | varFormatAutoSizes |
| Variable | varFormatDateTime |
| Variable | varFormatMetaInfo |
| Variable | varFormatMultiLine |
| Variable | varFormatOther |
| Variable | varFormatTimeDiff |
| Variable | varReplacements |
| Protected Field Index: inherited from alib::lox::detail::Logger | |
| NString32 | Name |
| NString32 | TypeName |
| Protected Field Index: inherited from alib::threads::RecursiveLock | |
| std::recursive_mutex | mutex |
| Protected Method Index: inherited from alib::lox::loggers::AnsiLogger | |
| void | AcknowledgeLox (detail::LoxImpl *lox, lang::ContainerOp op) override |
| virtual void | logText (detail::Domain &domain, Verbosity verbosity, AString &msg, detail::ScopeInfo &scope, int lineNumber, bool isRecursion) override |
| void | notifyMultiLineOp (lang::Phase) override |
| Empty implementation. | |
| Protected Method Index: inherited from alib::lox::textlogger::TextLogger | |
| TextLogger (const NString &pName, const NString &typeName) | |
| virtual void | processVariable (const NString &domainPath, Verbosity verbosity, detail::ScopeInfo &scope, AString &dest, Substring &variable) |
| virtual void | writeMetaInfo (AString &buffer, detail::Domain &domain, Verbosity verbosity, detail::ScopeInfo &scope) |
| virtual void | writeTimeDiff (AString &buffer, int64_t diffNanos) |
| Protected Method Index: inherited from alib::lox::detail::Logger | |
| Logger (const NString &name, const NString &typeName) | |
|
inlineexplicit |
Creates an AnsiConsoleLogger.
| name | The name of the Logger. Optional and defaults to the logger type name. "ANSI_CONSOLE". |
Definition at line 224 of file ansilogger.hpp.
|
inlineoverridevirtual |
Destructs an AnsiConsoleLogger.
Definition at line 228 of file ansilogger.hpp.