mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 01:24:36 +00:00
try to fix ci compile errors (+1 squashed commits)
Squashed commits: [d0d49663] fixed log multiline (+1 squashed commits) Squashed commits: [81a8befe] try to fix linux build error (+1 squashed commits) Squashed commits: [22850dda] try to fix build (+1 squashed commits) Squashed commits: [b8294611] missing type
This commit is contained in:
parent
040de7d899
commit
2d9a90b652
6 changed files with 52 additions and 38 deletions
|
@ -12,6 +12,9 @@
|
|||
#include <vector>
|
||||
#include "preprocessing.hpp"
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <cinttypes>
|
||||
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#include <sys/sysctl.h>
|
||||
#include <sys/types.h>
|
||||
|
@ -253,6 +256,22 @@ void* sd_log_cb_data = NULL;
|
|||
|
||||
#define LOG_BUFFER_SIZE 1024
|
||||
|
||||
static bool do_log = true;
|
||||
void log_message(const char* format, ...) {
|
||||
if (do_log) {
|
||||
printf("\n");
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
fflush(stdout);
|
||||
}
|
||||
}
|
||||
void set_log_message(bool log)
|
||||
{
|
||||
do_log = log;
|
||||
}
|
||||
|
||||
void log_printf(sd_log_level_t level, const char* file, int line, const char* format, ...) {
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue