ALib C++ Framework
by
Library Version:
2605 R0
Documentation generated by
Loading...
Searching...
No Matches
ALib
src
alib
alox
loggers
vstudiologger.cpp
1
#if defined(_MSC_VER) && ALIB_DEBUG
2
3
using namespace
alib
;
4
using namespace
alib::lox
;
5
using namespace
alib::lox::detail
;
6
7
//##################################################################################################
8
// Constructor/Destructor
9
//##################################################################################################
10
11
VStudioLogger::VStudioLogger
(
const
NString
& name )
12
:
PlainTextLogger
( name,
"VSTUDIO_CONSOLE"
)
13
{
14
ALIB_ASSERT_ERROR
(
BASECAMP
.IsDebuggerPresent(),
"ALOX"
,
15
"This is not a debug session within Visual Studio"
)
16
}
17
18
void
VStudioLogger::AcknowledgeLox
(
detail::LoxImpl
*
lox
,
lang::ContainerOp
op ) {
19
TextLogger::AcknowledgeLox
(
lox
, op );
20
if
( op !=
lang::ContainerOp::Insert
)
21
return
;
22
23
// prevent cutting off filenames
24
auto
& fmt=
GetFormatMetaInfo
();
25
fmt.Format.SearchAndReplace(
A_CHAR
(
"%SF:%SL:"
),
A_CHAR
(
"%SP\\%SF(%SL):"
) );
26
}
27
28
bool
VStudioLogger::notifyPlainTextLogOp
(
lang::Phase
phase)
29
{
30
if
( phase ==
lang::Phase::End
)
31
OutputDebugStringA(
"\r\n"
);
32
return
true
;
33
}
34
35
integer
VStudioLogger::logPlainTextPart
(
const
String
& buffer,
integer
start,
integer
length )
36
{
37
outputString
.Reset(
String
(buffer.
Buffer
() + start, length ) );
38
ALIB_STRINGS_TO_NARROW
(
outputString
, dest, 8192);
39
OutputDebugStringA ( dest );
40
return
outputString
.WStringLength();
41
}
42
43
44
#endif
//defined(_MSC_VER) && ALIB_DEBUG
A_CHAR
#define A_CHAR(STR)
Definition
alib.prepro.hpp:1327
ALIB_ASSERT_ERROR
#define ALIB_ASSERT_ERROR(cond, domain,...)
Definition
alib.prepro.hpp:1146
alib::lox::loggers::VStudioLogger::logPlainTextPart
virtual integer logPlainTextPart(const String &buffer, integer start, integer length)
Definition
vstudiologger.cpp:35
alib::lox::loggers::VStudioLogger::outputString
AString outputString
Definition
vstudiologger.hpp:39
alib::lox::loggers::VStudioLogger::notifyPlainTextLogOp
virtual bool notifyPlainTextLogOp(lang::Phase phase)
Definition
vstudiologger.cpp:28
alib::lox::loggers::VStudioLogger::AcknowledgeLox
virtual void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
Definition
vstudiologger.cpp:18
alib::lox::loggers::VStudioLogger::VStudioLogger
VStudioLogger(const NString &name=nullptr)
Definition
vstudiologger.cpp:11
alib::lox::textlogger::PlainTextLogger::PlainTextLogger
PlainTextLogger(const NString &name, const NString &typeName)
Definition
plaintextlogger.hpp:35
alib::lox::textlogger::TextLogger::AcknowledgeLox
virtual void AcknowledgeLox(detail::LoxImpl *lox, lang::ContainerOp op) override
Definition
textlogger.cpp:519
alib::lox::textlogger::TextLogger::GetFormatMetaInfo
FormatMetaInfo & GetFormatMetaInfo()
Definition
textlogger.hpp:228
alib::strings::TString::Buffer
constexpr const TChar * Buffer() const
Definition
string.hpp:295
alib::lang::ContainerOp
ContainerOp
Denotes standard container operations.
Definition
commonenumdefs.hpp:50
alib::lang::ContainerOp::Insert
@ Insert
Denotes insertions.
Definition
commonenumdefs.hpp:51
alib::lang::Phase
Phase
Denotes a phase, e.g.,of a transaction.
Definition
commonenumdefs.hpp:108
alib::lang::Phase::End
@ End
The end of a transaction.
Definition
commonenumdefs.hpp:110
alib::lox::detail
Definition
domain.cpp:1
alib::lox
Definition
alox.cpp:14
alib
Definition
alox.cpp:14
alib::NString
strings::TString< nchar > NString
Type alias in namespace #"%alib".
Definition
string.hpp:2174
alib::integer
lang::integer integer
Type alias in namespace #"%alib".
Definition
integers.hpp:149
alib::String
strings::TString< character > String
Type alias in namespace #"%alib".
Definition
string.hpp:2165
alib::BASECAMP
camp::Basecamp BASECAMP
The singleton instance of ALib Camp class #"Basecamp".
Definition
basecamp.cpp:2
ALIB_STRINGS_TO_NARROW
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
Definition
strings.prepro.hpp:41
alib::lox::detail::LoxImpl
Definition
loxpimpl.cpp:83