Logging Text Output

One of the simplest methods to monitor and log the state of your application is by printing text information to the standard output or standard error. For example, you can implement the following loop to continuously output an increasing integer every second:

#include <iostream>
#include <unistd.h>

int main() {
    int i = 0;
    while (true) {
        std::cout << i++ << std::endl;

Viewing Logs via the Vehicle Web UI

You can then view the application's standard output by visiting the Apps page of the Vehicle Web UI. Click the cog icon at the top-right corner of your application's widget, and select Logs:

This will open a new panel containing the logs of your application:

Viewing Logs via the Command Line

Alternatively, you can use the Auterion CLI tool to view the app's logs. You can list the available applications with:

$ auterion-cli app list
App name                         Version    App status    App enable (autostart)    Service name        Service status    Service enable (autostart)    SSH port
-------------------------------  ---------  ------------  ------------------------  ------------------  ----------------  ----------------------------  ----------
com.auterion.app-base-v2         v2         stopped       disabled                  base-image          exited            exited                        None
com.auterion.example-app         0.0.1      running       enabled                   example-app         running           running                       None
com.auterion.precision-delivery  1.4.18     running       enabled                   precision-delivery  running           running                       None
com.auterion.video2ros           0.5.0      restarting    enabled                   add-file            running           running                       14114

Then access the desired app's logs by specifying its name as done in the following command:

$ auterion-cli app logs -f com.auterion.example-app
com.auterion.example-app.example-app  | [example_app-1] 0
com.auterion.example-app.example-app  | [example_app-1] 1
com.auterion.example-app.example-app  | [example_app-1] 2

Use the -f flag to follow the logs as more outputs arrive. Alternatively -a to show all available logs.

Log Files and Suite Display

Printf's from apps are also added to the log file, and displayed in the suite. Here's an example:

To prevent message spamming, there is a rate limitation filter. If an application outputs too many messages at once, additional messages are dropped and a message in the form of throttle: dropping data for '<app>'

Last updated