Gazebo Utils

API Reference

3.0.0
SplitConsoleSink Class Reference

Logging sink for spdlog that logs in Gazebo-conventions. More...

#include <SplitSink.hh>

Public Member Functions

 SplitConsoleSink ()
 Class constructor.
 
 ~SplitConsoleSink () override=default
 Class destructor.
 
void flush () override
 Flush messages.
 
void log (const spdlog::details::log_msg &_msg) override
 Log a message.
 
void set_color_mode (spdlog::color_mode _mode)
 Set the color mode.
 
void set_formatter (std::unique_ptr< spdlog::formatter > _sinkFormatter) override
 Set the new formatter.
 
void set_pattern (const std::string &_pattern) override
 Set the logging pattern.
 

Detailed Description

Logging sink for spdlog that logs in Gazebo-conventions.

This will route messages with severity (warn, err, critical) to stderr, and all other levels (info, debug, trace) to stdout.

Constructor & Destructor Documentation

◆ SplitConsoleSink()

Class constructor.

◆ ~SplitConsoleSink()

~SplitConsoleSink ( )
overridedefault

Class destructor.

Member Function Documentation

◆ flush()

void flush ( )
override

Flush messages.

◆ log()

void log ( const spdlog::details::log_msg &  _msg)
override

Log a message.

Parameters
[in]_msgThe message to log.

◆ set_color_mode()

void set_color_mode ( spdlog::color_mode  _mode)

Set the color mode.

Parameters
[in]_modeColor mode.

◆ set_formatter()

void set_formatter ( std::unique_ptr< spdlog::formatter >  _sinkFormatter)
override

Set the new formatter.

Parameters
[in]_sinkFormatterThe formatter.

◆ set_pattern()

void set_pattern ( const std::string _pattern)
override

Set the logging pattern.

Parameters
[in]_patternThe logging pattern.

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