Accessing message level in custom log function (esp_log_set_vprintf)

cgawron
Posts: 1
Joined: Mon Sep 03, 2018 6:52 am

Accessing message level in custom log function (esp_log_set_vprintf)

Postby cgawron » Mon Sep 03, 2018 7:00 am

I would like to use esp_log_set_vprintf() to forward log messages to a remote syslog server.
For that, I would like to have access to the log level of the message just being formatted.

Is there an official way to get this information?

If not, the workaround I'm considering is to patch the log component and to expose the level of the current message in an exported variable (which gets set in esp_log_write() before calling s_log_print_func()).
I would appreciate any suggestions for a cleaner solution.

Who is online

Users browsing this forum: No registered users and 217 guests