Hi,
On my system (VSCode IDE monitor), any call to ESP_LOGI(...) results in output colored green. ESP_LOGW(...) gives yellow, while ESP_LOGD and ESP_LOGV are both white. Is it possible to configure the coloring, atleast make debug messages differentiable from verbose ones (based on color), and make both of them differentiable from normal printf(...) outputs (based on color)?
How to change esp log output colors?
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: How to change esp log output colors?
Looks like there's no easy way to change it, the colors are constants defined in components/log/include/esp_log.h (specifically, the LOG_COLOR_[letter] defines. You could copy that entire component in your own components folder and modify it.
Re: How to change esp log output colors?
thx I'll be doing exactly that. btw... as a suggestion... it would be nice if an additional parameter (that can have a default value), is specifiable, that provides the capability to selectively mute logs of lower level in the event that a message of higher level is to be printed. For example, when I switch between INFO and VERBOSE, often I include the same information in the VERBOSE output statements, so that everything appears on a single line. In this case the repetitive outputs of lower log levels is annoying. It would be nice thus to be able to programmatically set the log level to verbose, while specifically indicating that INFO and/or DEBUG or everything below VERBOSE should be muted.
Who is online
Users browsing this forum: No registered users and 37 guests