what is the info printed with esp_log

peter_moulin
Posts: 6
Joined: Fri May 15, 2020 12:48 pm

what is the info printed with esp_log

Postby peter_moulin » Mon May 24, 2021 2:38 pm

I developp an APP with esp-IDF under Eclipse.

I use some instruction like ESP_LOGI(TAG_TX, " %s ",msg_V);
where TAG_TX is static const char *TAG_TX = "->";
and char msg_V[]={'V','N','2','.','0' ,'\n'};

Resulting on the output terminal in
<27>[0;32mI (25907) ->: VN2.0

nota <27> is 0x1B ( escape char) in hexa

Can somebody tells me what are those complementary info before the expected ->: VN2.0
I suppose that (25907) is a timestamp? and what about 0x1B[0;32ml
Is it possible not to print those?

Help appreciated

Pierre


peter_moulin
Posts: 6
Joined: Fri May 15, 2020 12:48 pm

Re: what is the info printed with esp_log

Postby peter_moulin » Thu May 27, 2021 6:19 am

Thanks for your answer.
I had already read and used it (https://github.com/espressif/esp-idf/bl ... config#L87)

My question is more about: is it possible to avoid the cryptic info before the data, i.e. "<27>[0;32mI (13989)"
in a line like <27>[0;32mI (13989) smart_if: client number 0 sock: 55
where the pertinent info for me is only "smart_if: client number 0 sock: 55"

Setting the level will define if a complete line is send to output or not.

Might be nice to keep the time stamp if need be
out would be then (13989) smart_if: client number 0 sock: 55



I hope that I am clear

Pierre

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: what is the info printed with esp_log

Postby ESP_Sprite » Thu May 27, 2021 8:53 am

Disable the option WiFive pointed out (in menuconfig, use the / key to look for it).

peter_moulin
Posts: 6
Joined: Fri May 15, 2020 12:48 pm

Re: what is the info printed with esp_log

Postby peter_moulin » Thu May 27, 2021 5:05 pm

I am not sure of what you mean by menuconfig and where to find it.
Is it with idf.py menuconfig or with sdkconfig under eclipse ?
In the latest there is a
#
# Log output
#
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
CONFIG_LOG_DEFAULT_LEVEL_INFO=y
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_LOG_COLORS=y
CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set
# end of Log output

But that is only about the level not the "content", most probably it is not what you tell me to find.

Can you help me a bit more? :cry:

ESP_Sprite
Posts: 9772
Joined: Thu Nov 26, 2015 4:08 am

Re: what is the info printed with esp_log

Postby ESP_Sprite » Fri May 28, 2021 1:23 am

I think any of them would work. You need to disable the CONFIG_LOG_COLORS parameter; the escape codes you're seeing encode to colors on a terminal that supports them. (Note that this doesn't disable the timestamps; I don't think you can disable those.)

peter_moulin
Posts: 6
Joined: Fri May 15, 2020 12:48 pm

Re: what is the info printed with esp_log

Postby peter_moulin » Fri May 28, 2021 6:17 am

Thanks for answer. It is also possible to use "#define LOG_LOCAL_LEVEL ESP_LOG_WARN" or any level in the code itself.

Best regards,
Pierre

Who is online

Users browsing this forum: No registered users and 99 guests