How to log basic 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;
sleep(1);
}
}Viewing Logs via the Vehicle Web UI
You can then view the application standard output by visiting the Apps page of the Vehicle Web UI. Click the cog icon at the top-right corner of your application 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 logs. You can list the available applications with:
Then access the desired app logs by specifying its name as done in the following command:
Use the -f flag to follow the logs as more outputs arrive. Alternatively -a to show all available logs.
Log Files and Suite Display
Any write to stdout and stderr from apps is also added to the ulog file, and displayed in the suite. Here's an example:

Last updated