Logs is a product to stream logs directly from ROS nodes to the cloud where they can be viewed and queried.

How it works

  1. When the agent connects to the cloud it is instructed to collect logs if the user has specified logs should be collected for that robot.

  2. If this is the case, then the agent will subscribe to /rosout and send all messages it receives to the cloud.

  3. If the agent is not connected to the network at the time the message should be sent, it will be buffered in memory and retried when connection is resumed. All log levels are collected and the timestamp of the log is taken on the robot.

  4. Logs can then be viewed on the dashboard and queried through the API.

Logging in ROS

Any logs produced by the below code (or similar) will be collected if it has been turned on for the robot. More information about how to log in ROS can be found in their docs.

RCLCPP_DEBUG(node->get_logger(), "My log message %d", 4);

Configuring logs collection

By default logs will not be collected. You can turn on or off logs collection on a per-robot basis. Once turned on every log message of every level will be recorded until it is turned off.

Log format

robot_id<string>The ID of the robot.
stamp<int>The time the log was recorded on the robot.
level<string>The log level (see below).
name<string>The name representing the logger this message came from.
file<string>The file the message came from.
function<string>The function the message came from.
line<string>The line in the file the message came from.
msg<int>The full log message.

Log levels

DEBUGDebug is for pedantic information, which is useful when debugging issues.
INFOInfo is the standard informational level and is used to report expected information.
WARNWarning is for information that may potentially cause issues or possibly unexpected behavior.
ERRORError is for information that this node cannot resolve.
FATALInformation about a impending node shutdown.