35 #define NUMBERMAX 9999
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
108 typedef struct LogMessage LogMessage;
158 char *nextFileName,
const size_t nameLength,
const int indexOffset);
175 const size_t sizeConsideredEmpty);
186 #ifdef SDLOG_NEED_QUEUE
207 SdioError sdLogOpenLog(
FileDes *fileObject,
const char *directoryName,
const char *prefix,
208 const uint32_t autoFlushPeriod,
const bool appendTagAtClose,
209 const size_t sizeInMo,
const bool preallocate,
char *fileName,
const size_t nameLength);
257 __attribute__ ((format (printf, 2, 3)));;
340 size_t sdLogGetNbBytesWrittenToStorage(
void);
static const float offset[]
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
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.