ALib C++ Library
Library Version: 2402 R1
Documentation generated by doxygen
Loading...
Searching...
No Matches
AnsiConsoleLogger Class Reference

Description:


A AnsiLogger that logs all messages to the standard output cout. The name of the Logger defaults to "ANSI_CONSOLE".

Provides 'cout' to the constructor of its parent class AnsiLogger. See class AnsiLogger for more information on ANSI escape sequences and their use.

Note
To avoid misunderstandings: This class can not enable the output console (which receives ALox log data) to support ANSI Escape Codes. The opposite is right: this class should be used only if the console supports ANSI Escape Codes.

Definition at line 241 of file ansilogger.hpp.

#include <ansilogger.hpp>

Inheritance diagram for AnsiConsoleLogger:
[legend]
Collaboration diagram for AnsiConsoleLogger:
[legend]

Public Method Index:

ALIB_API AnsiConsoleLogger (const NString &name=nullptr)
 
virtual ALIB_API ~AnsiConsoleLogger () override
 
- Public Method Index: inherited from AnsiLogger
ALIB_API AnsiLogger (const NString &name=nullptr, const NString &typeName="ANSI")
 
ALIB_API AnsiLogger (std::ostream *pOStream, const NString &name=nullptr, const NString &typeName="ANSI")
 
virtual ALIB_API ~AnsiLogger () override
 
- Public Method Index: inherited from TextLogger
virtual ALIB_API ~TextLogger () override
 
virtual ALIB_API void AcknowledgeLox (LoxImpl *lox, lang::ContainerOp op) override
 
virtual ALIB_API void ClearReplacements ()
 
virtual ALIB_API void Log (Domain &domain, Verbosity verbosity, Boxes &logables, ScopeInfo &scope) override
 
virtual ALIB_API void ResetAutoSizes ()
 
virtual ALIB_API void SetReplacement (const String &searched, const String &replacement)
 
- Public Method Index: inherited from Logger
virtual ~Logger ()
 
const NStringGetName () const
 
const NStringGetTypeName () const
 
- Public Method Index: inherited from SmartLock
 SmartLock ()
 
void Acquire (const NCString &dbgFile, int dbgLine, const NCString &dbgFunc)
 
ALIB_API int AddAcquirer (ThreadLock *newAcquirer)
 
ALIB_API int CntAcquirers ()
 
ALIB_API void Release ()
 defined(ALIB_DOX)
 
ALIB_API int RemoveAcquirer (ThreadLock *acquirer)
 
- Public Method Index: inherited from ThreadLock
ALIB_API ThreadLock (lang::Safeness safeness=lang::Safeness::Safe)
 
ALIB_API ~ThreadLock ()
 
ALIB_API void Acquire (const NCString &dbgFile, int dbgLine, const NCString &dbgFunc)
 
int CountAcquirements () const
 
ThreadGetOwner () const
 
lang::Safeness GetSafeness () const
 
bool IsOwnedByCurrentThread () const
 
ALIB_API void Release ()
 defined(ALIB_DOX)
 
ALIB_API void SetSafeness (lang::Safeness safeness)
 
bool WillRelease () const
 

Additional Inherited Members

- Public Type Index: inherited from TextLogger
enum class  LightColorUsage { Auto , Never , Foreground , Background }
 
- Public Static Field Index: inherited from 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 Static Field Index: inherited from SmartLock
static ALIB_API SmartLock StdOutputStreams
 
- Public Field Index: inherited from AnsiLogger
LightColorUsage UseLightColors
 
- Public Field Index: inherited from TextLogger
strings::util::AutoSizes AutoSizes
 
ObjectConverterConverter = nullptr
 
String16 FmtMsgSuffix
 
String64 FmtMultiLineMsgHeadline = A_CHAR("ALox: Multi line message follows: ")
 
String16 FmtMultiLinePrefix = A_CHAR(">> ")
 
String16 FmtMultiLineSuffix = A_CHAR("")
 
textlogger::MetaInfoMetaInfo
 
AString MultiLineDelimiter
 
String16 MultiLineDelimiterRepl = A_CHAR("\\r")
 
int MultiLineMsgMode =2
 
- Public Field Index: inherited from Logger
integer CntLogs =0
 
time::Ticks TimeOfCreation
 
time::Ticks TimeOfLastLog
 
- Public Field Index: inherited from ThreadLock
NCString DbgOwnerFile =nullptr
 
NCString DbgOwnerFunc =nullptr
 
int DbgOwnerLine
 
uint16_t DbgRecursionWarningThreshold =10
 
integer DbgWarningAfterWaitTimeInMillis =2000L
 

Constructor(s) / Destructor Details::

◆ AnsiConsoleLogger()

AnsiConsoleLogger ( const NString & name = nullptr)
explicit

Creates an AnsiConsoleLogger.

Parameters
name(Optional) The name of the Logger, defaults to "CONSOLE".

Definition at line 269 of file ansilogger.cpp.

◆ ~AnsiConsoleLogger()

~AnsiConsoleLogger ( )
overridevirtual

Destructs an AnsiConsoleLogger

Definition at line 274 of file ansilogger.cpp.


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