mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
updated lite, extra error logging
This commit is contained in:
parent
4d9ccddc2c
commit
0ecf13fc13
3 changed files with 111 additions and 15 deletions
|
@ -132,7 +132,24 @@ static void llama_log_callback_default(ggml_log_level level, const char * text,
|
|||
|
||||
#define LLAMA_LOG_INFO(...) llama_log_internal(GGML_LOG_LEVEL_INFO , __VA_ARGS__)
|
||||
#define LLAMA_LOG_WARN(...) llama_log_internal(GGML_LOG_LEVEL_WARN , __VA_ARGS__)
|
||||
#define LLAMA_LOG_ERROR(...) llama_log_internal(GGML_LOG_LEVEL_ERROR, __VA_ARGS__)
|
||||
#define LLAMA_LOG_ERROR(...) kcpp_log_internal(GGML_LOG_LEVEL_ERROR, __VA_ARGS__)
|
||||
|
||||
static bool kcppstderr = false;
|
||||
static void kcpp_log_internal(ggml_log_level level, const char * format, ...) {
|
||||
if (kcppstderr) {
|
||||
printf("\n");
|
||||
va_list args;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
va_list args2;
|
||||
va_start(args2, format);
|
||||
llama_log_internal(level, format, args2);
|
||||
va_end(args2);
|
||||
}
|
||||
|
||||
//
|
||||
// helpers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue