SdCardLogHandlerRK
|
Class for logging to SD card. More...
#include <SdCardLogHandlerRK.h>
Public Member Functions | |
SdCardLogHandler (SdFat &sd, uint8_t csPin, uint8_t divisor, LogLevel level=LOG_LEVEL_INFO, LogCategoryFilters filters={}) | |
Constructor. The object is normally instantiated as a global object. More... | |
virtual size_t | write (uint8_t) |
Virtual override for the StreamLogHandler to write data to the log. | |
Class for logging to SD card.
You normally instantiate one of these as a global variable, passing in the SdFat object and the parameters you'd normally pass to SdFat::begin(). You can optionally pass the LogLevel and LogCategoryFilters parameters you'd pass to the LogHandler constructor.
You can pass additional options using the fluent-style methods beginning with "with" like withLogsDirName().
SdCardLogHandler::SdCardLogHandler | ( | SdFat & | sd, |
uint8_t | csPin, | ||
uint8_t | divisor, | ||
LogLevel | level = LOG_LEVEL_INFO , |
||
LogCategoryFilters | filters = {} |
||
) |
Constructor. The object is normally instantiated as a global object.
sd | The SdFat object, normally allocated a global object. |
csPin | The pin used for the SPI chip select for the SD card reader |
divisor | Usually either SPI_FULL_SPEED or SPI_HALF_SPEED. |
level | (optional, default is LOG_LEVEL_INFO) |
filters | (optional, default is none) |