log : add CONT level for continuing previous log entry (#9610)

This commit is contained in:
Georgi Gerganov 2024-09-24 10:15:35 +03:00 committed by GitHub
parent 0aa15011e3
commit cea1486ecf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 29 additions and 24 deletions

View file

@ -28,6 +28,8 @@ void llama_log_callback_default(ggml_log_level level, const char * text, void *
#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_DEBUG(...) llama_log_internal(GGML_LOG_LEVEL_DEBUG, __VA_ARGS__)
#define LLAMA_LOG_CONT(...) llama_log_internal(GGML_LOG_LEVEL_CONT , __VA_ARGS__)
//
// helpers

View file

@ -18671,9 +18671,9 @@ struct llama_model * llama_load_model_from_file(
unsigned percentage = (unsigned) (100 * progress);
while (percentage > *cur_percentage_p) {
*cur_percentage_p = percentage;
LLAMA_LOG(".");
LLAMA_LOG_CONT(".");
if (percentage >= 100) {
LLAMA_LOG("\n");
LLAMA_LOG_CONT("\n");
}
}
return true;