#include <vstudiologger.hpp>
A logger that logs to the Visual Studio output pane using OutputDebugString(). The name of the Logger defaults to "VSTUDIO_CONSOLE".
ALox text logger escape sequences (see class ESC) are removed and ignored.
Definition at line 34 of file vstudiologger.hpp.
Public Methods | |
ALIB_API | VStudioLogger (const NString &name=nullptr) |
virtual ALIB_API | ~VStudioLogger () |
![]() | |
virtual ALIB_API | ~TextLogger () override |
virtual ALIB_API void | AcknowledgeLox (LoxImpl *lox, 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) |
![]() | |
virtual | ~Logger () |
const NString & | GetName () const |
const NString & | GetTypeName () const |
![]() | |
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) More... | |
ALIB_API int | RemoveAcquirer (ThreadLock *acquirer) |
![]() | |
ALIB_API | ThreadLock (Safeness safeness=Safeness::Safe) |
ALIB_API | ~ThreadLock () |
ALIB_API void | Acquire (const NCString &dbgFile, int dbgLine, const NCString &dbgFunc) |
int | CountAcquirements () const |
Thread * | GetOwner () const |
Safeness | GetSafeness () const |
bool | IsOwnedByCurrentThread () const |
ALIB_API void | Release () |
defined(ALIB_DOX) More... | |
ALIB_API void | SetSafeness (Safeness safeness) |
bool | WillRelease () const |
Protected Fields | |
AString | outputString |
![]() | |
AString | logBuf |
AString | msgBuf |
std::vector< AString > | replacements |
int | stdStreamLockRegistrationCounter =0 |
bool | usesStdStreams |
![]() | |
NString32 | Name |
NString32 | TypeName |
![]() | |
std::vector< ThreadLock * > | acquirers |
ThreadLockNR | lock |
![]() | |
uint16_t | cntAcquirements =0 |
std::mutex | mutex |
std::condition_variable | mutexNotifier |
std::thread::id | owner |
Safeness | safeness |
Protected Methods | |
virtual ALIB_API integer | logSubstring (const String &buffer, integer start, integer length) |
virtual ALIB_API bool | notifyLogOp (lib::Phase phase) |
virtual ALIB_API void | notifyMultiLineOp (lib::Phase) |
![]() | |
PlainTextLogger (const NString &name, const NString &typeName, bool pUsesStdStreams) | |
virtual | ~PlainTextLogger () override |
virtual ALIB_API void | logText (detail::Domain &domain, Verbosity verbosity, AString &msg, detail::ScopeInfo &scope, int lineNumber) override |
![]() | |
ALIB_API | TextLogger (const NString &pName, const NString &typeName, bool pUsesStdStreams) |
![]() | |
Logger (const NString &name, const NString &typeName) | |
|
explicit |
Creates a VStudioLogger.
name | (Optional) The name of the Logger, defaults to "VSTUDIO_CONSOLE". |
Definition at line 39 of file vstudiologger.cpp.
|
virtual |
Write the given region of the given AString to the destination buffer.
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 PlainTextLogger.
Definition at line 58 of file vstudiologger.cpp.
|
protectedvirtual |
Start a new log line. Appends a new-line character sequence to previously logged lines.
phase | Indicates the beginning or end of a log operation. |
Implements PlainTextLogger.
Definition at line 51 of file vstudiologger.cpp.
|
inlineprotectedvirtual |
Empty implementation, not needed for this class
Implements TextLogger.
Definition at line 95 of file vstudiologger.hpp.
|
protected |
A character buffer used for the creation of zero-terminated output strings required by the VStudio logger interface.
If ALIB_CHARACTERS_WIDE is set, this string also acts as a converter to wide characters.
Definition at line 47 of file vstudiologger.hpp.