A logger that logs all messages to the standard output std::cout. The name of the Logger defaults to "CONSOLE".
ALox text logger escape sequences (see class ESC) are removed and ignored.
Definition at line 24 of file consolelogger.inl.
Public Method Index: | |
| ConsoleLogger (const NString &name=nullptr) | |
| virtual | ~ConsoleLogger () override |
| Destructs a ConsoleLogger. | |
| Public Method Index: inherited from alib::lox::textlogger::TextLogger | |
| virtual | ~TextLogger () override |
| Destructs a TextLogger. | |
| virtual void | AcknowledgeLox (detail::LoxImpl *lox, lang::ContainerOp op) override |
| 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 |
| bool | SetVerbosityExport (Lox *lox, bool value, Priority priority=Priority::Standard) |
| 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. | |
Protected Field Index: | |
| MonoAllocator | ma |
| Allocator used for the OStreamWriter. | |
| lang::Placeholder< OStreamWriter< nchar, MonoAllocator, true > > | writer |
| 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: | |
| virtual integer | logPlainTextPart (const String &buffer, integer start, integer length) override |
| virtual void | notifyMultiLineOp (lang::Phase) override |
| Empty implementation, not needed for this class. | |
| virtual bool | notifyPlainTextLogOp (lang::Phase phase) override |
| Protected Method Index: inherited from alib::lox::textlogger::PlainTextLogger | |
| PlainTextLogger (const NString &name, const NString &typeName) | |
| virtual | ~PlainTextLogger () override |
| Destructs a MemoryLogger. | |
| virtual void | logText (detail::Domain &domain, Verbosity verbosity, AString &msg, detail::ScopeInfo &scope, int lineNumber, bool isRecursion) override |
| 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) | |
Additional Inherited Members | |
| Public Field Index: inherited from alib::lox::textlogger::PlainTextLogger | |
| bool | PruneESCSequences =true |
| 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 |
Allocator used for the OStreamWriter.
Definition at line 28 of file consolelogger.inl.
|
protected |
The OStreamWriter encapsulated in a placeholder. The instance is constructed and destructed with notifyPlainTextLogOp. With that, synchronized output is guaranteed.
Definition at line 33 of file consolelogger.inl.
|
inlineexplicit |
Creates a ConsoleLogger.
| name | (Optional) The name of the Logger, defaults to "CONSOLE". |
Definition at line 38 of file consolelogger.inl.
|
inlineoverridevirtual |
Destructs a ConsoleLogger.
Definition at line 43 of file consolelogger.inl.
|
overrideprotectedvirtual |
Writes the given region of the given string to the console.
| buffer | The string to write a portion of. |
| start | The start of the portion in buffer to write out. |
| length | The length of the portion in buffer to write out. |
Implements alib::lox::textlogger::PlainTextLogger.
Definition at line 42 of file consolelogger.cpp.
|
inlineoverrideprotectedvirtual |
Empty implementation, not needed for this class.
Implements alib::lox::textlogger::TextLogger.
Definition at line 68 of file consolelogger.inl.
|
overrideprotectedvirtual |
Starts/ends log line. Appends a new-line character sequence to previously logged lines.
| phase | Indicates the beginning or end of a log line. |
Implements alib::lox::textlogger::PlainTextLogger.
Definition at line 31 of file consolelogger.cpp.