logger
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
logger::Logger Class Reference

#include <Logger.hpp>

Inheritance diagram for logger::Logger:

Classes

struct  ReportDescription
 

Public Member Functions

 Logger (std::string const &name="logger::Logger", TaskCore::TaskState initial_state=Stopped)
 
 ~Logger ()
 
virtual bool createLoggingPort (::std::string const &port_name, ::std::string const &type_name, ::std::vector< ::logger::StreamMetadata > const &metadata)
 
bool reportComponent (const std::string &component)
 
bool unreportComponent (const std::string &component)
 
bool reportPort (const std::string &component, const std::string &port)
 
bool unreportPort (const std::string &component, const std::string &port)
 
void snapshot ()
 
void clear ()
 
bool removeLoggingPort (std::string const &stream_name)
 

Protected Member Functions

bool startHook ()
 
void updateHook ()
 
void stopHook ()
 

Protected Attributes

Typelib::Registry * m_registry
 
std::ofstream * m_io
 
Logging::Logfilem_file
 

Friends

class LoggerBase
 

Constructor & Destructor Documentation

◆ Logger()

Logger::Logger ( std::string const &  name = "logger::Logger",
TaskCore::TaskState  initial_state = Stopped 
)

◆ ~Logger()

Logger::~Logger ( )

Member Function Documentation

◆ clear()

void Logger::clear ( )

Removes all reporting ports and channels

◆ createLoggingPort()

bool Logger::createLoggingPort ( ::std::string const &  port_name,
::std::string const &  type_name,
::std::vector< ::logger::StreamMetadata > const &  metadata 
)
virtual

◆ removeLoggingPort()

bool Logger::removeLoggingPort ( std::string const &  stream_name)

◆ reportComponent()

bool Logger::reportComponent ( const std::string &  component)

Report all the data ports of a component.

◆ reportPort()

bool Logger::reportPort ( const std::string &  component,
const std::string &  port 
)

Report a specific data port of a component.

◆ snapshot()

void Logger::snapshot ( )

This real-time function makes copies of the data to be reported.

◆ startHook()

bool Logger::startHook ( )
protected

◆ stopHook()

void Logger::stopHook ( )
protected

◆ unreportComponent()

bool Logger::unreportComponent ( const std::string &  component)

Unreport the data ports of a component.

◆ unreportPort()

bool Logger::unreportPort ( const std::string &  component,
const std::string &  port 
)

Unreport a specific data port of a component.

◆ updateHook()

void Logger::updateHook ( )
protected

Friends And Related Function Documentation

◆ LoggerBase

friend class LoggerBase
friend

Member Data Documentation

◆ m_file

Logging::Logfile* logger::Logger::m_file
protected

◆ m_io

std::ofstream* logger::Logger::m_io
protected

◆ m_registry

Typelib::Registry* logger::Logger::m_registry
protected

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