Logging solution #2066
Replies: 2 comments 2 replies
-
I miss the ESP32 chatty-by-default logs also. There are some debug-logging macros enabled by defining Once enabled you can use things like There are a number of independent logging libraries for Arduino
I probably missed some! I have no idea which of those is any good, actually maintained, and/or compatible with the RP2040 and this particular core. Please report back if you find something especially likeable. It would be nice to have a logging facility that isn't tied to a processor-specific core. Judging by the questionable metrics of Github stars and forks, probably ArduinoLog, arduino-logger, and DebugLog would seem like they have the most momentum? |
Beta Was this translation helpful? Give feedback.
-
Some of my thoughts I wrote down, would be waste to not share it. Of course, described things are HIGHLY SUBJECTIVE, and not something I would actually actively pursue; maybe one day I will make some better logging solution for myself; for now I'm good enough with the ones I mentioned in my original post above. Search and wondering around was fun tho. Maybe I will revisit the problem and come up with some better logging solution myself one day. What I want from logging library?Note: By "ability" I mean there is option, not forced behaviour, to do something.
Other features nice to have
Other features, which might be too over-engineered
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any suggested logging solution to be used with Arduino, or rather this specific core?
In simple projects I just use few
Serial.print
s without much thinking, sometimes with conditional macros. In some project I have singular macro/function likedprintf
or something to encapsulate it and iron the thing out (snprintf
to buffer, thenSerial.print
).In ESP32 projects I use ESP-IDF (SDK) built-in macros/functions
ESP_LOG*
, and it nicely support multiple logging levels etc. There are few sad things, like being unable to easily set log level per-file, but in general it feels firm and nice. AFIK the Arduino-Pico core supports RP2040 C SDK, maybe there is some mini logging framework I missed?On one of my larger scale Arduino-based projects I used my own simple logging system built with macros, also with multiple warning levels, set from separate file. While I guess I could use it for my current project as well, I wanted to ask here first in case there is something a bit more "official" or anything worth considering.
Beta Was this translation helpful? Give feedback.
All reactions