2022-12-04 18:54:57 +01:00
|
|
|
/*
|
|
|
|
This is part of WHY2
|
|
|
|
Copyright (C) 2022 Václav Šmejkal
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
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#)
|
2022-11-18 19:46:57 +01:00
|
|
|
{
|
|
|
|
INVALID_FILE = -1 //THIS WILL HAPPEN IF YOU USE TOO MUCH LOGS lol
|
|
|
|
};
|
|
|
|
|
2022-11-22 18:55:34 +01:00
|
|
|
#define WRITE_MESSAGE "Hello from logger-test! 👋"
|
2022-11-22 18:56:10 +01:00
|
|
|
#define WRITE_DIR "./logs"
|
2022-11-22 18:55:34 +01:00
|
|
|
|
2022-11-18 19:33:29 +01:00
|
|
|
#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)
|
2022-11-23 19:48:59 +01:00
|
|
|
#define LOG_FORMAT_START "yyyy-mm-dd" //FIRST PART OF LOG_FORMAT
|
|
|
|
|
2022-11-23 19:31:26 +01:00
|
|
|
#define LOG_FORMATTING "%s/%04d-%02d-%02d_%03x.log" //SAME THING AS LOG_FORMAT, BUT USED IN sprintf IN logger.c, NOT AS LENGTH
|
2022-11-23 19:48:59 +01:00
|
|
|
#define LOG_FORMATTING_START "%04d-%02d-%02d" //FIRST PART OF LOG_FORMATTING
|
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
|
|
|
|
2022-11-21 12:05:47 +00:00
|
|
|
#define MAX_USAGE 0xfff //LOOK AT LOG_FORMAT
|
2022-11-18 19:10:03 +01:00
|
|
|
|
|
|
|
#endif
|