Closed woquchonglang closed 1 week ago
BTW, Can I cancel the timestamp?
It is NOT messy. It is the raw output of your firmware. It appears to be writing ANSI codes intended for a console. A terminal (not all) typically takes those ANSI codes to make changes to the screen including cursor movement, font/color changes, etc. You can even write games/animation with it.
So, this is not a bug. It is not our job to turn the logfile into a terminal.
fine, I found the code about LOGI, but what my teminal output is "INFO: xxx", the logfile output is just the "messy code", should I change the encode or code?
#define LOGI(format, ...) \
LOG_PROTO("INFO: ", RTT_CTRL_TEXT_BRIGHT_GREEN, format, ##__VA_ARGS__)
I don't know what you or your team members prefer. You can also output the same to two channels, one intended for the console and one for the logfile and modify your #define to output both.
There are also programs/scripts to strip ANSI codes that you can look at
https://stackoverflow.com/questions/17998978/removing-colors-from-output
I don't know what you or your team members prefer. You can also output the same to two channels, one intended for the console and one for the logfile and modify your #define to output both.
There are also programs/scripts to strip ANSI codes that you can look at
https://stackoverflow.com/questions/17998978/removing-colors-from-output
thank you very much ,what 's else,I only can use the port 0,when I set printf to the buffer 1 ,it doesn't work,and I have changed the rttconfig to port 1(by the stlink to debug)
Describe the bug
the log file‘ s time timestamp is messy code
Screenshots
Environment (please complete the following information):
OS: arch linux 6.11.3-zen
Cortex-Debug (vscode plugin)
Compiler Toolchain Version: [ arn-none-eabi 14.2 ]
Please include
launch.json
Attach text from
Debug Console
Please enable debug output in your launch.json (
"showDevDebugOutput": "raw"
). It this is too large, please attach it as a file