log : do not append to existing log + disable file line func by default

This commit is contained in:
Georgi Gerganov 2023-08-29 13:59:55 +03:00
parent b97958a511
commit 6b4c65be83
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
2 changed files with 9 additions and 8 deletions

View file

@ -4,6 +4,7 @@
#include "llama.h" #include "llama.h"
#define LOG_NO_FILE_LINE_FUNCTION
#include "log.h" #include "log.h"
#include <string> #include <string>

View file

@ -378,11 +378,11 @@ inline FILE *_log_handler1(bool change = false, LogTriState disable = LogTriStat
} }
logfile = nullptr; logfile = nullptr;
logfile = fopen(filename.c_str(), "a"); logfile = fopen(filename.c_str(), "w");
} }
else else
{ {
logfile = fopen(filename.c_str(), "a"); logfile = fopen(filename.c_str(), "w");
} }
} }