8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Configuration MACRO 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 )
#define ALIB_WARNING(domain,...)
virtual void notifyMultiLineOp(lang::Phase phase) override
lang::Placeholder< OStreamWriter< nchar, MonoAllocator, true > > writer
void openFile()
Opens the file.
virtual bool notifyPlainTextLogOp(lang::Phase phase) override
bool currentlyInMultiLineOp
Flag to prevent file open/close operations when multi-line text logging is performed.
void closeFile()
Closes the file.
std::ofstream * ofs
Encapsulates the text file stream in a system-dependent way.
MonoAllocator ma
Allocator used for the #"std::OStreamWriter".
virtual integer logPlainTextPart(const String &buffer, integer start, integer length) override
TextFileLogger(const alib::String &fileName, const alib::NString &loggerName=nullptr)
std::errc LastSystemError
alib::AString FileName
The path and fileName to the log file.
PlainTextLogger(const NString &name, const NString &typeName)
TString< TChar > Substring(integer regionStart, integer regionLength=MAX_LEN) const
Phase
Denotes a phase, e.g.,of a transaction.
@ Begin
The start of a transaction.
@ End
The end of a transaction.
strings::TString< nchar > NString
Type alias in namespace alib.
lang::integer integer
Type alias in namespace alib.
strings::TString< character > String
Type alias in namespace alib.
#define ALIB_STRINGS_TO_NARROW( src, dest, bufSize)