Main Page
Namespaces
Classes
Files
File List
File Members
src
logger.h
Go to the documentation of this file.
1
// Logs all output to a log file for the run
2
// Author: Max Schwarz <max.schwarz@uni-bonn.de>
3
4
#ifndef LOGGER_H
5
#define LOGGER_H
6
7
#include <string>
8
9
#include "
log_event.h
"
10
11
namespace
rosmon
12
{
13
17
class
Logger
18
{
19
public
:
25
explicit
Logger
(
const
std::string& path,
bool
flush =
false
);
26
~Logger
();
27
29
void
log
(
const
LogEvent
& event);
30
private
:
31
FILE*
m_file
=
nullptr
;
32
bool
m_flush
=
false
;
33
};
34
35
}
36
37
#endif
rosmon::Logger::m_file
FILE * m_file
Definition:
logger.h:31
rosmon::Logger::Logger
Logger(const std::string &path, bool flush=false)
Constructor.
Definition:
logger.cpp:19
rosmon::LogEvent
Definition:
log_event.h:12
rosmon
Definition:
diagnostics_publisher.cpp:34
rosmon::Logger
Write log messages into a log file.
Definition:
logger.h:17
rosmon::Logger::log
void log(const LogEvent &event)
Log message.
Definition:
logger.cpp:37
log_event.h
rosmon::Logger::m_flush
bool m_flush
Definition:
logger.h:32
rosmon::Logger::~Logger
~Logger()
Definition:
logger.cpp:31
rosmon_core
Author(s): Max Schwarz
autogenerated on Sat Jan 9 2021 03:35:43