AFR Log viewer

Is there any tool available that allow viewing the terminal log with filtering and colors etc.?

ANSI color escape may be a candidate. It supports background/foreground coloring and bold/underline/blink.

As an example, here’s what it looks like on my terminal (MacOS).
foreground/background color:

Both color and effect:
Screen Shot 2020-04-16 at 12.25.12 PM

Could test your terminal capability with this piece of python script:
(Need to change the ending from .h to .py. The forum setting does not allow me to upload .py. Run with python ansi_color_coding.py)
ansi_color_coding.h (507 Bytes)

And additionally, in Windows 10, above does not work out of box. May need to look into https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences.
to enable setting.

Other references regarding to ANSI color coding:

There may be other solutions better suit your use case. The only thing I personally like about ANSI color coding is it mostly works without dependencies. Though each terminal may do things differently.

And in terms of parsing logs, could add keywords to aid filtering. (e.g. DEBUG, WARNiNG, XXXLIBRARY, …) (e.g. Using GCC predefined macros like __LINE__, __FUNCTION__, __FILE__ in the logger template. )

1 Like

I would like to take the opportunity to recommend our tool Tracealyzer for FreeRTOS.
This can show a lot of things, including terminal output, with a lot of filtering possibilities and graphical visualization of tasks, data and various metrics. To see the terminal output, redirect it to the recorder library function vTraceConsoleChannelPrintF(), as described in this AWS partner blog post.

1 Like