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 std::string &source, const std::string &msg)
 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 15 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 std::string &  source,
const std::string &  msg 
)

Log message.

Definition at line 37 of file logger.cpp.

Member Data Documentation

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

Definition at line 29 of file logger.h.

bool rosmon::Logger::m_flush = false
private

Definition at line 30 of file logger.h.


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


rosmon_core
Author(s): Max Schwarz
autogenerated on Wed Jul 10 2019 03:10:12