diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-03 15:43:28 -0300 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2022-08-03 15:43:28 -0300 |
commit | c68ef16c494a1c61bc702b7df0b21dc24d8eaf4f (patch) | |
tree | 0033cb36032106102a44a8b6986597a2a2d59d55 | |
parent | 3b7d4c04106b01bbbedad81e62011eba74ab3c6c (diff) |
log: Add `printlog()`
This works exactly like `printlog()`, except it uses variadic arguments.
-rw-r--r-- | log.c | 7 | ||||
-rw-r--r-- | log.h | 1 |
2 files changed, 8 insertions, 0 deletions
@@ -26,3 +26,10 @@ void vprintlog(log_output output_type, int priority, const char *fmt, va_list ar } free(buf); } + +void printlog(log_output output_type, int priority, const char *fmt, ...) { + va_list args; + va_start(args, fmt); + vprintlog(output_type, priority, fmt, args); + va_end(args); +} @@ -13,6 +13,7 @@ enum log_output { }; extern void vprintlog(log_output output_type, int priority, const char *fmt, va_list args); +extern void printlog(log_output output_type, int priority, const char *fmt, ...); #endif |