Stormancer::FileLogger Class Reference

Logger which writing in a file. More...

#include <FileLogger.h>

Inherits Stormancer::ILogger, and enable_shared_from_this< FileLogger >.

Public Member Functions

STORMANCER_DLL_API FileLogger (const std::string &name="", const std::string &filepath="", bool immediate=false)
 Constructor.
 
STORMANCER_DLL_API FileLogger (const std::string &filepath, bool immediate)
 
virtual STORMANCER_DLL_API ~FileLogger ()=default
 Destructor.
 
void log (LogLevel level, const std::string &category, const std::string &message, const std::string &data) override
 
- Public Member Functions inherited from Stormancer::ILogger
virtual void log (const std::string &message)
 Logs a simple message.
 
virtual void log (const std::exception &ex)
 Logs an exception.
 
virtual void log (LogLevel level, const std::string &category, const std::string &message, const std::exception &ex)
 Logs a full message with exception as data.
 

Additional Inherited Members

- Static Public Member Functions inherited from Stormancer::ILogger
static std::string format (const std::string &name, LogLevel level, const std::string &category, const std::string &message, const std::string &data="")
 
static std::string formatException (const std::string &name, const std::exception &ex)
 
- Protected Member Functions inherited from Stormancer::ILogger
 ILogger (const std::string &name="")
 
- Protected Attributes inherited from Stormancer::ILogger
const std::string _name
 

Detailed Description

Logger which writing in a file.

Member Function Documentation

◆ log()

void Stormancer::FileLogger::log ( LogLevel  level,
const std::string &  category,
const std::string &  message,
const std::string &  data 
)
overridevirtual

A detailed message log.

Parameters
levelThe level.
categoryThe category (typically the source).
messageThe message.
dataSome extra data.

Implements Stormancer::ILogger.


The documentation for this class was generated from the following file:
  • stormancer/stormancer-sources/include/public/stormancer/Logger/FileLogger.h