LogHandler for SDcard



I was wondering if anyone has written a custom LogHandler that uses the sd card as a target?

if not is there a general approach to writing your own logHandler?


Have you found a solution for this? If not, I’ll take a stab at it this weekend. Is it a safe assumption that you use SdFat for your SD writing needs?


I made my own, it’s not too pretty though.


Awesome, thanks for the start! I’m having some issues with it (probably on my side) but will try to get it working today. How do you set the LOG_LEVEL and filters? It doesn’t seem to want to compile when using the same syntax as is used for the SerialLogHandler?


So I gave it a shot (adapted it a bit) and it seems to work great for the regular SPI bus, but won’t compile for the alternate SPI bus (SPI1). Any idea how to adapt the globals/externs to get it to work? Normally, one would just initialize the SdFat class with a (1) ex. SdFat sd(1); ?


I don’t have any time today. I’ll take a look and get back to you tomorrow.