Gazebo Common

API Reference

5.7.0

Container for loggers, and global logging options (such as verbose vs. quiet output). More...

#include <common/common.hh>

Static Public Member Functions

static std::string Prefix ()
 Get custom prefix. This is empty by default. More...
 
static void SetPrefix (const std::string &_customPrefix)
 Add a custom prefix in front of the default prefixes. More...
 
static void SetVerbosity (const int _level)
 Set verbosity, where <= 0: No output, 1: Error messages, 2: Error and warning messages, 3: Error, warning, and info messages, >= 4: Error, warning, info, and debug messages. More...
 
static int Verbosity ()
 Get the verbose level. More...
 

Static Public Attributes

static Logger dbg
 Global instance of the debug logger. More...
 
static Logger err
 Global instance of the error logger. More...
 
static FileLogger log
 Global instance of the file logger. More...
 
static Logger msg
 Global instance of the message logger. More...
 
static Logger warn
 Global instance of the warning logger. More...
 

Detailed Description

Container for loggers, and global logging options (such as verbose vs. quiet output).

Member Function Documentation

◆ Prefix()

static std::string Prefix ( )
static

Get custom prefix. This is empty by default.

Returns
The custom prefix.
See also
void SetPrefix(const std::string &_customPrefix)

◆ SetPrefix()

static void SetPrefix ( const std::string _customPrefix)
static

Add a custom prefix in front of the default prefixes.

By default, the custom prefix is an empty string, so the messages start as:

[Err], [Wrn], [Msg], [Dbg]

If you set the prefix to "-my-", for example, they become:

-my-[Err], -my-[Wrn], -my-[Msg], -my-[Dbg]

Parameters
[in]_customPrefixPrefix string.
See also
std::string Prefix() const

◆ SetVerbosity()

static void SetVerbosity ( const int  _level)
static

Set verbosity, where <= 0: No output, 1: Error messages, 2: Error and warning messages, 3: Error, warning, and info messages, >= 4: Error, warning, info, and debug messages.

Parameters
[in]_levelThe new verbose level.

◆ Verbosity()

static int Verbosity ( )
static

Get the verbose level.

Returns
The level of verbosity.
See also
SetVerbosity(const int _level)

Member Data Documentation

◆ dbg

Logger dbg
static

Global instance of the debug logger.

◆ err

Logger err
static

Global instance of the error logger.

◆ log

FileLogger log
static

Global instance of the file logger.

◆ msg

Logger msg
static

Global instance of the message logger.

◆ warn

Logger warn
static

Global instance of the warning logger.


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