cmeel-console-bridge

1.0.2.3 · active · verified Thu Apr 16

cmeel-console-bridge is a cmeel distribution for `console-bridge`, a ROS-independent C++ logging package. It provides logging calls that mirror those found in `rosconsole` but for applications that do not necessarily use ROS. This package is currently at version 1.0.2.3 and receives regular updates.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to import `console_bridge` and use its primary logging functions (`logDebug`, `logInform`, `logWarn`, `logError`) to output messages. The logging levels mirror those found in `rosconsole`. Note the use of C-style format strings for message interpolation.

import console_bridge

# Set the logging level (optional, default might be INFO or higher)
# console_bridge.setLogLevel(console_bridge.CONSOLE_BRIDGE_LOG_DEBUG)

console_bridge.logDebug("This is a debug message.")
console_bridge.logInform("This is an informational message.")
console_bridge.logWarn("This is a warning message.")
console_bridge.logError("This is an error message.")

# Example of using format strings, similar to C-style printf
name = "World"
value = 42
console_bridge.logInform("Hello, %s! The answer is %d.", name, value)

view raw JSON →