36#define NUMBERFMF "%s\\%s%.04d.LOG"
95#if SDLOG_ALL_BUFFERS_SIZE == 0 || SDLOG_MAX_MESSAGE_LEN == 0 || \
96 SDLOG_QUEUE_BUCKETS == 0
97#undef SDLOG_NEED_QUEUE
99#define SDLOG_NEED_QUEUE
102#define LOG_PREALLOCATION_ENABLED true
103#define LOG_PREALLOCATION_DISABLED false
104#define LOG_APPEND_TAG_AT_CLOSE_ENABLED true
105#define LOG_APPEND_TAG_AT_CLOSE_DISABLED false
107#ifdef SDLOG_NEED_QUEUE
108typedef struct LogMessage LogMessage;
158 char *nextFileName,
const size_t nameLength,
const int indexOffset);
175 const size_t sizeConsideredEmpty);
189 const uint8_t *data,
const size_t len);
200#ifdef SDLOG_NEED_QUEUE
221SdioError sdLogOpenLog(
FileDes *fileObject,
const char *directoryName,
const char *prefix,
222 const uint32_t autoFlushPeriod,
const bool appendTagAtClose,
223 const size_t sizeInMo,
const bool preallocate,
char *fileName,
const size_t nameLength);
271 __attribute__ ((format (printf, 2, 3)));;
uint8_t sdLogGetFatfsResult(void)
SdioError sdLogFinish(void)
unmount filesystem
struct _SdLogBuffer SdLogBuffer
SdioError removeEmptyLogs(const char *directoryName, const char *prefix, const size_t sizeConsideredEmpty)
remove spurious log file left on sd
SdioError getFileName(const char *prefix, const char *directoryName, char *nextFileName, const size_t nameLength, const int indexOffset)
get last used name for a pattern, then add offset and return valid filename
SdioError sdLogInit(uint32_t *freeSpaceInKo)
initialise sdLog
SdioError sdLogWriteFile(const char *directoryName, const char *fileName, const uint8_t *data, const size_t len)
write a whole file, if it does not exist yet
SdioError sdLogFlushAllLogs(void)
SdioError sdLogWriteLog(const FileDes fd, const char *fmt,...)
SdioError sdLogWriteByte(const FileDes fd, const uint8_t value)
SdioError sdLogGetStorageStatus(void)
SdioError sdLogWriteRaw(const FileDes fd, const uint8_t *buffer, const size_t len)
size_t sdLogGetNbBytesWrittenToStorage(void)
SdioError sdLogFlushLog(const FileDes fd)
static const float offset[]
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.