Namespaces | |
namespace | levels |
Classes | |
struct | FileToken |
class | FilterBase |
Base-class for filters. Filters allow full user-defined control over whether or not a message should print. The ROS_X_FILTER... macros provide the filtering functionality. More... | |
struct | FilterParams |
Parameter structure passed to FilterBase::isEnabled(...);. Includes both input and output parameters. More... | |
struct | FixedMapToken |
struct | FixedToken |
struct | Formatter |
struct | FunctionToken |
struct | LineToken |
struct | LoggerToken |
struct | LogLocation |
Internal. More... | |
struct | MessageToken |
struct | PlaceHolderToken |
class | ROSConsoleStdioAppender |
struct | SeverityToken |
class | StaticInit |
struct | ThreadToken |
struct | TimeToken |
struct | Token |
Typedefs | |
typedef levels::Level | Level |
typedef std::map< std::string, std::string > | M_string |
typedef boost::shared_ptr< Token > | TokenPtr |
typedef std::vector < LogLocation * > | V_LogLocation |
typedef std::vector< TokenPtr > | V_Token |
Functions | |
ROSCONSOLE_DECL void | checkLogLocationEnabled (LogLocation *loc) |
Internal. | |
void | checkLogLocationEnabledNoLock (LogLocation *loc) |
TokenPtr | createTokenFromType (const std::string &type) |
void | do_initialize () |
For internal use only. Does the actual initialization of the rosconsole system. Should only be called once. | |
ROSCONSOLE_DECL void | formatToBuffer (boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt,...) |
ROSCONSOLE_DECL std::string | formatToString (const char *fmt,...) |
static boost::shared_array< char > | g_print_buffer (new char[INITIAL_BUFFER_SIZE]) |
ROSCONSOLE_DECL void | initialize () |
Don't call this directly. Performs any required initialization/configuration. Happens automatically when using the macro API. | |
ROSCONSOLE_DECL void | initializeLogLocation (LogLocation *loc, const std::string &name, Level level) |
Internal. | |
ROSCONSOLE_DECL void | notifyLoggerLevelsChanged () |
Tells the system that a logger's level has changed. | |
ROSCONSOLE_DECL void | print (FilterBase *filter, log4cxx::Logger *logger, Level level, const char *file, int line, const char *function, const char *fmt,...) ROSCONSOLE_PRINTF_ATTRIBUTE(7 |
Don't call this directly. Use the ROS_LOG() macro instead. | |
ROSCONSOLE_DECL void ROSCONSOLE_DECL void | print (FilterBase *filter, log4cxx::Logger *logger, Level level, const std::stringstream &str, const char *file, int line, const char *function) |
ROSCONSOLE_DECL void | registerLogLocation (LogLocation *loc) |
Registers a logging location with the system. | |
ROSCONSOLE_DECL void | setFixedFilterToken (const std::string &key, const std::string &val) |
ROSCONSOLE_DECL void | setLogLocationLevel (LogLocation *loc, Level level) |
Internal. | |
ROSCONSOLE_DECL void | shutdown () |
ROSCONSOLE_DECL void | vformatToBuffer (boost::shared_array< char > &buffer, size_t &buffer_size, const char *fmt, va_list args) |
Variables | |
M_string | g_extra_fixed_tokens |
const char * | g_format_string = "[${severity}] [${time}]: ${message}" |
Formatter | g_formatter |
boost::mutex | g_init_mutex |
ROSCONSOLE_DECL bool | g_initialized = false |
Only exported because the macros need it. Do not use directly. | |
ROSCONSOLE_DECL log4cxx::LevelPtr | g_level_lookup [] |
boost::mutex | g_locations_mutex |
V_LogLocation | g_log_locations |
static size_t | g_print_buffer_size = INITIAL_BUFFER_SIZE |
static boost::mutex | g_print_mutex |
static boost::thread::id | g_printing_thread_id |
bool | g_shutting_down = false |
StaticInit | g_static_init |
struct ROSCONSOLE_DECL | LogLocation |
typedef levels::Level ros::console::Level |
typedef std::map<std::string, std::string> ros::console::M_string |
Definition at line 97 of file rosconsole.cpp.
typedef boost::shared_ptr<Token> ros::console::TokenPtr |
Definition at line 94 of file rosconsole.cpp.
typedef std::vector<LogLocation*> ros::console::V_LogLocation |
Definition at line 665 of file rosconsole.cpp.
typedef std::vector<TokenPtr> ros::console::V_Token |
Definition at line 95 of file rosconsole.cpp.
void ros::console::checkLogLocationEnabled | ( | LogLocation * | loc | ) |
Internal.
Definition at line 705 of file rosconsole.cpp.
void ros::console::checkLogLocationEnabledNoLock | ( | LogLocation * | loc | ) |
Definition at line 675 of file rosconsole.cpp.
TokenPtr ros::console::createTokenFromType | ( | const std::string & | type | ) |
Definition at line 257 of file rosconsole.cpp.
void ros::console::do_initialize | ( | ) |
For internal use only. Does the actual initialization of the rosconsole system. Should only be called once.
Definition at line 411 of file rosconsole.cpp.
void ros::console::formatToBuffer | ( | boost::shared_array< char > & | buffer, |
size_t & | buffer_size, | ||
const char * | fmt, | ||
... | |||
) |
Definition at line 514 of file rosconsole.cpp.
std::string ros::console::formatToString | ( | const char * | fmt, |
... | |||
) |
Definition at line 524 of file rosconsole.cpp.
static boost::shared_array<char> ros::console::g_print_buffer | ( | new | char[INITIAL_BUFFER_SIZE] | ) | [static] |
void ros::console::initialize | ( | ) |
Don't call this directly. Performs any required initialization/configuration. Happens automatically when using the macro API.
If you're going to be using log4cxx or any of the ros::console functions, and need the system to be initialized, use the ROSCONSOLE_AUTOINIT macro.
Definition at line 476 of file rosconsole.cpp.
void ros::console::initializeLogLocation | ( | LogLocation * | loc, |
const std::string & | name, | ||
Level | level | ||
) |
Internal.
Definition at line 680 of file rosconsole.cpp.
Tells the system that a logger's level has changed.
This must be called if a log4cxx::Logger's level has been changed in the middle of an application run. Because of the way the static guard for enablement works, if a logger's level is changed and this function is not called, only logging statements which are first hit *after* the change will be correct wrt that logger.
Definition at line 711 of file rosconsole.cpp.
void ros::console::print | ( | FilterBase * | filter, |
log4cxx::Logger * | logger, | ||
Level | level, | ||
const char * | file, | ||
int | line, | ||
const char * | function, | ||
const char * | fmt, | ||
... | |||
) |
Don't call this directly. Use the ROS_LOG() macro instead.
level | Logging level |
file | File this logging statement is from (usually generated with __FILE__) |
line | Line of code this logging statement is from (usually generated with __LINE__) |
fmt | Format string |
Definition at line 544 of file rosconsole.cpp.
void ros::console::print | ( | FilterBase * | filter, |
log4cxx::Logger * | logger, | ||
Level | level, | ||
const std::stringstream & | str, | ||
const char * | file, | ||
int | line, | ||
const char * | function | ||
) |
Definition at line 611 of file rosconsole.cpp.
void ros::console::registerLogLocation | ( | LogLocation * | loc | ) |
Registers a logging location with the system.
This is used for the case where a logger's verbosity level changes, and we need to reset the enabled status of all the logging statements.
loc | The location to add |
Definition at line 668 of file rosconsole.cpp.
void ros::console::setFixedFilterToken | ( | const std::string & | key, |
const std::string & | val | ||
) |
Definition at line 100 of file rosconsole.cpp.
void ros::console::setLogLocationLevel | ( | LogLocation * | loc, |
Level | level | ||
) |
Internal.
Definition at line 699 of file rosconsole.cpp.
void ros::console::shutdown | ( | ) |
Definition at line 735 of file rosconsole.cpp.
void ros::console::vformatToBuffer | ( | boost::shared_array< char > & | buffer, |
size_t & | buffer_size, | ||
const char * | fmt, | ||
va_list | args | ||
) |
Definition at line 487 of file rosconsole.cpp.
Definition at line 98 of file rosconsole.cpp.
const char* ros::console::g_format_string = "[${severity}] [${time}]: ${message}" |
Definition at line 88 of file rosconsole.cpp.
Definition at line 383 of file rosconsole.cpp.
boost::mutex ros::console::g_init_mutex |
Definition at line 66 of file rosconsole.cpp.
bool ros::console::g_initialized = false |
Only exported because the macros need it. Do not use directly.
Definition at line 64 of file rosconsole.cpp.
{ log4cxx::Level::getDebug(), log4cxx::Level::getInfo(), log4cxx::Level::getWarn(), log4cxx::Level::getError(), log4cxx::Level::getFatal(), }
Definition at line 68 of file rosconsole.cpp.
boost::mutex ros::console::g_locations_mutex |
Definition at line 667 of file rosconsole.cpp.
Definition at line 666 of file rosconsole.cpp.
size_t ros::console::g_print_buffer_size = INITIAL_BUFFER_SIZE [static] |
Definition at line 542 of file rosconsole.cpp.
boost::mutex ros::console::g_print_mutex [static] |
Definition at line 540 of file rosconsole.cpp.
boost::thread::id ros::console::g_printing_thread_id [static] |
Definition at line 543 of file rosconsole.cpp.
bool ros::console::g_shutting_down = false |
Definition at line 65 of file rosconsole.cpp.
Definition at line 732 of file rosconsole.cpp.