Avoid reporting timestamp if custom logger is used (#2905)

Loggers (e.g. glog) usually come with instrumentation to add timestamp
and other information when reporting. That results in the timestamp
being reported twice, making the output confusing.
This commit is contained in:
Enrico Loparco 2023-12-14 07:55:17 +01:00 committed by GitHub
parent 18529253d8
commit b5022015fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,7 +43,9 @@ bh_log(LogLevel log_level, const char *file, int line, const char *fmt, ...)
"%02" PRIu32 ":%02" PRIu32 ":%02" PRIu32 ":%03" PRIu32, h, m, s,
mills);
#ifndef BH_VPRINTF
os_printf("[%s - %" PRIXPTR "]: ", buf, (uintptr_t)self);
#endif
if (file)
os_printf("%s, line %d, ", file, line);