summaryrefslogtreecommitdiff
path: root/libmisc/log.c
diff options
context:
space:
mode:
authorLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-19 21:20:13 -0700
committerLuke T. Shumaker <lukeshu@lukeshu.com>2024-11-19 22:05:53 -0700
commit24cd8ca4ee1ea08526eb82e6c122870c86da5603 (patch)
tree25e467df0236b8a514bbc328299f8500277f9512 /libmisc/log.c
parent1cc68fb6f72ada5446a9914cc3bf97db9259a880 (diff)
Add libmisc/log.h to remove stdio.h
Diffstat (limited to 'libmisc/log.c')
-rw-r--r--libmisc/log.c19
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;
+}