8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
22 module ALib.ALox.Impl;
42 auto* os=
new std::ofstream( nFileName, std::ios::app );
43 if ( !os->is_open() ) {
45 ALIB_WARNING(
"ALOX",
"Could not open file: \"{}\". System error code: {}",
57 ofs=
new std::ofstream( nFileName, std::ios::app );
58 if ( !
ofs->is_open() ) {
60 ALIB_WARNING(
"ALOX",
"Could not open file: \"{}\". System error code: {}",
87 else if(
ofs !=
nullptr )
virtual ALIB_DLL void notifyMultiLineOp(lang::Phase phase) override
lang::Placeholder< OStreamWriter< nchar, MonoAllocator, true > > writer
ALIB_DLL void openFile()
Opens the file.
virtual ALIB_DLL bool notifyPlainTextLogOp(lang::Phase phase) override
bool currentlyInMultiLineOp
Flag to prevent file open/close operations when multi-line text logging is performed.
ALIB_DLL void closeFile()
Closes the file.
std::ofstream * ofs
Encapsulates the text file stream in a system-dependent way.
MonoAllocator ma
Allocator used for the OStreamWriter.
virtual ALIB_DLL integer logPlainTextPart(const String &buffer, integer start, integer length) override
ALIB_DLL TextFileLogger(const alib::String &fileName, const alib::NString &loggerName=nullptr)
alib::AString FileName
The path and fileName to the log file.
SystemErrors LastSystemError
PlainTextLogger(const NString &name, const NString &typeName)
TString< TChar > Substring(integer regionStart, integer regionLength=MAX_LEN) const
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)
#define ALIB_WARNING(domain,...)
Phase
Denotes a phase, e.g.,of a transaction.
@ Begin
The start of a transaction.
@ End
The end of a transaction.
lang::integer integer
Type alias in namespace alib.
strings::TString< nchar > NString
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
system::SystemErrors SystemErrors
Type alias in namespace alib.