We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 524907a commit 8efa0f6Copy full SHA for 8efa0f6
examples/main/main.cpp
@@ -100,6 +100,12 @@ static void sigint_handler(int signo) {
100
}
101
#endif
102
103
+static void llama_log_callback_logTee(ggml_log_level level, const char * text, void * user_data) {
104
+ (void) level;
105
+ (void) user_data;
106
+ LOG_TEE("%s", text);
107
+}
108
+
109
int main(int argc, char ** argv) {
110
gpt_params params;
111
g_params = ¶ms;
@@ -113,6 +119,7 @@ int main(int argc, char ** argv) {
113
119
log_set_target(log_filename_generator("main", "log"));
114
120
LOG_TEE("Log start\n");
115
121
log_dump_cmdline(argc, argv);
122
+ llama_log_set(llama_log_callback_logTee, nullptr);
116
123
#endif // LOG_DISABLE_LOGS
117
124
118
125
// TODO: Dump params ?
0 commit comments