Gazebo Utils

API Reference

3.0.0~pre3
Logger Class Reference

Gazebo console and file logging class. This will configure spdlog with a sane set of defaults for logging to the console as well as a file. More...

#include <Logger.hh>

Public Member Functions

 Logger (const std::string &_loggerName)
 Class constructor.
 
std::string LogDestination () const
 Get the log destination filename.
 
spdlog::logger & RawLogger () const
 Access the underlying spdlog logger.
 
std::shared_ptr< spdlog::logger > RawLoggerPtr () const
 Access the underlying spdlog logger, with ownership.
 
void SetConsoleSinkLevel (spdlog::level::level_enum _level)
 Set the severity level of the Console sink.
 
void SetLogDestination (const std::string &_filename)
 Set the log destination filename.
 

Detailed Description

Gazebo console and file logging class. This will configure spdlog with a sane set of defaults for logging to the console as well as a file.

Constructor & Destructor Documentation

◆ Logger()

Logger ( const std::string _loggerName)
explicit

Class constructor.

Parameters
[in]_loggerNameLogger name.

Member Function Documentation

◆ LogDestination()

std::string LogDestination ( ) const

Get the log destination filename.

Returns
Log file name.

◆ RawLogger()

spdlog::logger & RawLogger ( ) const

Access the underlying spdlog logger.

Returns
The spdlog logger.

◆ RawLoggerPtr()

std::shared_ptr< spdlog::logger > RawLoggerPtr ( ) const

Access the underlying spdlog logger, with ownership.

Returns
The spdlog logger.

◆ SetConsoleSinkLevel()

void SetConsoleSinkLevel ( spdlog::level::level_enum  _level)

Set the severity level of the Console sink.

Parameters
[in]_levelSeverity level

◆ SetLogDestination()

void SetLogDestination ( const std::string _filename)

Set the log destination filename.

Parameters
[in]_filenameLog file name.

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