Skip to content

Commit be6c8d6

Browse files
committed
Update logging macros to use LLAMA logging functions in llava.cpp
1 parent e925da5 commit be6c8d6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/llava/llava.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "llava.h"
33

44
#include "llama.h"
5+
#include "llama-impl.h"
56

67
#include <algorithm>
78
#include <cerrno>
@@ -17,10 +18,10 @@
1718
# define LOG_ERR(...)
1819
# define LOG_DBG(...)
1920
#else // defined(LLAVA_LOG_OFF)
20-
# define LOG_INF(...) do { fprintf(stdout, __VA_ARGS__); } while (0)
21-
# define LOG_WRN(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
22-
# define LOG_ERR(...) do { fprintf(stderr, __VA_ARGS__); } while (0)
23-
# define LOG_DBG(...) do { fprintf(stdout, __VA_ARGS__); } while (0)
21+
# define LOG_INF(...) LLAMA_LOG_INFO(__VA_ARGS__)
22+
# define LOG_WRN(...) LLAMA_LOG_WARN(__VA_ARGS__)
23+
# define LOG_ERR(...) LLAMA_LOG_ERROR(__VA_ARGS__)
24+
# define LOG_DBG(...) LLAMA_LOG_DEBUG(__VA_ARGS__)
2425
#endif // defined(LLAVA_LOG_OFF)
2526

2627
// RGB uint8 image

0 commit comments

Comments
 (0)