-
Notifications
You must be signed in to change notification settings - Fork 7.6k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Support log redirection #9814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
#include "rom/ets_sys.h"
static void custom_debug_write_char(char c) {
//send the char to wherever you want, but be aware that this code might be called from interrupt
}
ets_install_putc1((void (*)(char)) & custom_debug_write_char);
ets_install_putc2(NULL); |
Thank you for the proposed solution. However, I am afraid of unwanted consequences of the proposed solution - it doesn't redirect the output of logging, but the output of the underlying layer. Thus any code using the A quick grep of the Arduino framework showed that |
|
The new logging library is in development in ESP-IDF and it should address both points. I think the initial version will appear in ESP-IDF before the end of the year. |
@igrr: Thank you for the update. Nevertheless, if I understood correctly, the Arduino framework is opinionated, hence they reimplement logging (differently than ESP-IDF). Will this change also propagate to the Arduino framework? |
Hello, Due to the overwhelming volume of issues currently being addressed, we have decided to close the previously received tickets. If you still require assistance or if the issue persists, please don't hesitate to reopen the ticket. Thanks. |
The issue persists, however, it seems that I don't have permission to reopen, I can only comment. |
where should i add this |
@Muskanjhawar in the |
Can you please help me with some example code or some reference like how
can i use this?
…On Sun, Mar 9, 2025 at 11:23 PM Kilian ***@***.***> wrote:
@Muskanjhawar <https://github.com/Muskanjhawar> in the platformio.ini
build_flags = -DUSE_ESP_IDF_LOG -DTAG=\"CORE\"
—
Reply to this email directly, view it on GitHub
<#9814 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGD734T6ECWIR23NLNGBE632TR53HAVCNFSM6AAAAABVHKJPZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYHE4DOMRQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
[image: kaerbr]*kaerbr* left a comment (espressif/arduino-esp32#9814)
<#9814 (comment)>
@Muskanjhawar <https://github.com/Muskanjhawar> in the platformio.ini
build_flags = -DUSE_ESP_IDF_LOG -DTAG=\"CORE\"
—
Reply to this email directly, view it on GitHub
<#9814 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BGD734T6ECWIR23NLNGBE632TR53HAVCNFSM6AAAAABVHKJPZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDOMBYHE4DOMRQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Moving to discussions since it is integrated and possible to use. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Related area
Core of the framework
Hardware specification
Not relevant
Is your feature request related to a problem?
The logging facilities provided by the Arduino framework are hard-coded to the main serial output. This is often unwanted (e.g. when the persistence of logs is required or the serial interface needs to be free for other purposes).
Describe the solution you'd like
Allow the user to specify a custom sink function for the logs.
Describe alternatives you've considered
I wanted to use the built-in ESP-IDF logging facilities; however, I ran into #9813
Additional context
No response
I have checked existing list of Feature requests and the Contribution Guide
The text was updated successfully, but these errors were encountered: