SA_Logger
Sapphire's Suite's C++ Logger.
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SA::FileLogStream Class Reference

Log file stream type. More...

#include <FileLogStream.hpp>

Inheritance diagram for SA::FileLogStream:
SA::ALogStream

Public Member Functions

 FileLogStream (const std::string &_fileFullPath="Logs/log.txt") noexcept
 
 ~FileLogStream () noexcept
 
void Flush () override final
 Force the stream to flush.
 
- Public Member Functions inherited from SA::ALogStream
virtual ~ALogStream ()=default
 Default virtual destructor.
 
void ProcessLog (const Log &_log, bool _bForce=false)
 Process a log to output in stream.
 
ALogStreamoperator<< (const Log &_log)
 Output log operator.
 

Protected Member Functions

void CreateLogFile (const std::string &_fileFullPath)
 Create log and log backup files.
 
void Output (const Log &_log) override final
 Output a log in stream.
 

Protected Attributes

std::wofstream mHandle
 Handled file stream.
 

Additional Inherited Members

- Public Attributes inherited from SA::ALogStream
LogChannelFilter channelFilter
 Channel filter used for log in stream.
 
uint8_t levelFlags = +LogLevel::Default
 Level filter used for log in stream.
 

Detailed Description

Log file stream type.

Constructor & Destructor Documentation

◆ FileLogStream()

SA::FileLogStream::FileLogStream ( const std::string & _fileFullPath = "Logs/log.txt")
noexcept

Value Constructor

Parameters
[in]_fileFullPathName and path of the file.

◆ ~FileLogStream()

SA::FileLogStream::~FileLogStream ( )
noexcept

Destructor. Close the file stream.

Member Function Documentation

◆ CreateLogFile()

void SA::FileLogStream::CreateLogFile ( const std::string & _fileFullPath)
protected

Create log and log backup files.

Parameters
[in]_fileFullPathName and path of the log file.

◆ Flush()

void SA::FileLogStream::Flush ( )
finaloverridevirtual

Force the stream to flush.

Reimplemented from SA::ALogStream.

◆ Output()

void SA::FileLogStream::Output ( const Log & _log)
finaloverrideprotectedvirtual

Output a log in stream.

Parameters
[in]_logLog to output.

Implements SA::ALogStream.


The documentation for this class was generated from the following file: