add log file writing

This commit is contained in:
tildearrow 2022-12-18 01:55:21 -05:00
parent d897ac32b0
commit 51ea3cec2a
6 changed files with 142 additions and 1 deletions

View file

@ -35,6 +35,9 @@
// this has to be a power of 2
#define TA_LOG_SIZE 2048
// this as well
#define TA_LOGFILE_BUF_SIZE 65536
extern int logLevel;
extern std::atomic<unsigned short> logPosition;
@ -76,4 +79,6 @@ template<typename... T> int logE(const char* msg, const T&... args) {
}
void initLog();
bool startLogFile(const char* path);
bool finishLogFile();
#endif