ALib C++ Library
Library Version: 2412 R0
Documentation generated by doxygen
Loading...
Searching...
No Matches
vstudiologger.cpp
1// #################################################################################################
2// alib::lox::loggers - ALox Logging Library
3//
4// Copyright 2013-2024 A-Worx GmbH, Germany
5// Published under 'Boost Software License' (a free software license, see LICENSE.txt)
6// #################################################################################################
8#if !DOXYGEN
10#endif // !DOXYGEN
11
12#if defined(_MSC_VER) && ALIB_DEBUG
14#include <iostream>
15#include <string.h>
16
17using namespace alib;
18using namespace alib::lox;
19using namespace alib::lox::detail;
20
21// #################################################################################################
22// Constructor/Destructor
23// #################################################################################################
24
26: PlainTextLogger( name, "VSTUDIO_CONSOLE", false )
27{
29 "This is not a debug session within Visual Studio" )
30}
31
34
38 return;
39
40 // prevent cutting off filenames
41 auto& fmt= GetFormatMetaInfo();
42 fmt.Format.SearchAndReplace( A_CHAR("%SF:%SL:"), A_CHAR("%SP\\%SF(%SL):") );
43}
44
46{
47 if ( phase == lang::Phase::End )
48 OutputDebugStringA( "\r\n" );
49 return true;
50}
51
53{
54 outputString.Reset( String(buffer.Buffer() + start, length ) );
56 OutputDebugStringA ( dest );
58}
59
60
61#endif //defined(_MSC_VER) && ALIB_DEBUG
62
ALIB_API bool IsDebuggerPresent()
virtual ALIB_API ~VStudioLogger()
Destructs a VStudioLogger.
virtual ALIB_API bool notifyLogOp(lang::Phase phase)
virtual ALIB_API void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
ALIB_API VStudioLogger(const NString &name=nullptr)
virtual ALIB_API integer logSubstring(const String &buffer, integer start, integer length)
FormatMetaInfo & GetFormatMetaInfo()
virtual ALIB_API void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
constexpr const TChar * Buffer() const
Definition string.hpp:319
integer WStringLength() const
#define A_CHAR(STR)
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
#define ALIB_ASSERT_ERROR(cond,...)
Definition alib.hpp:1271
Phase
Denotes a phase, e.g.,of a transaction.
@ End
The end of a transaction.
ContainerOp
Denotes standard container operations.
@ Insert
Denotes insertions.
Definition alib.cpp:69
lang::basecamp::BaseCamp BASECAMP
The singleton instance of ALib Camp class BaseCamp.
Definition basecamp.cpp:70
strings::TString< character > String
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
Definition integers.hpp:273