Public Member Functions | Private Attributes | List of all members
rosmon::Logger Class Reference

Write log messages into a log file. More...

#include <logger.h>

Public Member Functions

void log (const LogEvent &event)
 Log message. More...
 
 Logger (const std::string &path, bool flush=false)
 Constructor. More...
 
 ~Logger ()
 

Private Attributes

FILE * m_file = nullptr
 
bool m_flush = false
 

Detailed Description

Write log messages into a log file.

Definition at line 17 of file logger.h.

Constructor & Destructor Documentation

rosmon::Logger::Logger ( const std::string &  path,
bool  flush = false 
)
explicit

Constructor.

Parameters
pathPath to the output file

Definition at line 19 of file logger.cpp.

rosmon::Logger::~Logger ( )

Definition at line 31 of file logger.cpp.

Member Function Documentation

void rosmon::Logger::log ( const LogEvent event)

Log message.

Definition at line 37 of file logger.cpp.

Member Data Documentation

FILE* rosmon::Logger::m_file = nullptr
private

Definition at line 31 of file logger.h.

bool rosmon::Logger::m_flush = false
private

Definition at line 32 of file logger.h.


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


rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43