diff options
Diffstat (limited to 'libmisc/log.c')
-rw-r--r-- | libmisc/log.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libmisc/log.c b/libmisc/log.c new file mode 100644 index 0000000..a1ec10f --- /dev/null +++ b/libmisc/log.c @@ -0,0 +1,19 @@ +/* libmisc/log.c - stdio logging + * + * Copyright (C) 2024 Luke T. Shumaker <lukeshu@lukeshu.com> + * SPDX-License-Identifier: AGPL-3.0-or-later + */ + +#include <stdio.h> /* for vprintf() */ +#include <stdarg.h> /* for va_list, va_start(), va_end() */ + +#define LOG_NAME +#include <libmisc/log.h> + +int _log_printf(const char *format, ...) { + va_list va; + va_start(va, format); + int ret = vprintf(format, va); + va_end(va); + return ret; +} |