WHY2/include/logger/flags.h

21 lines
750 B
C
Raw Normal View History

2022-11-18 19:10:03 +01:00
#ifndef WHY2_LOGGER_FLAGS_H
#define WHY2_LOGGER_FLAGS_H
2022-11-18 19:15:52 +01:00
//CONSTS
2022-11-18 19:50:23 +01:00
const enum RETURN_CODES //exit codes you fucking idiot (2#)
{
INVALID_FILE = -1 //THIS WILL HAPPEN IF YOU USE TOO MUCH LOGS lol
};
#define WRITE_MESSAGE "Hello from logger-test! 👋"
#define WRITE_DIR "./logs"
#define LOG_FORMAT "yyyy-mm-dd_xxx.log" //THE LAST xxx IS FOR BASE-16 NUMBER OF USAGE THAT DAY (SO MAX IS 4095 [FFF] USAGES PER DAY)
#define LOG_FORMATTING "%s/%04d-%02d-%02d_%03x" //SAME THING AS LOG_FORMAT, BUT USED IN sprintf IN logger.c, NOT AS LENGTH
2022-11-22 18:35:46 +01:00
#define WRITE_FORMAT "[hh:mm:ss] " //LOG MESSAGE'S PREFIX (THE SPACE AT THE END IS INTENTIONAL)
2022-11-22 18:46:46 +01:00
#define WRITE_FORMATTING "[%02d:%02d:%02d]: %s" //guess what
2022-11-22 18:35:46 +01:00
#define MAX_USAGE 0xfff //LOOK AT LOG_FORMAT
2022-11-18 19:10:03 +01:00
#endif