summary refs log tree commit diff
path: root/logging.h
diff options
context:
space:
mode:
authorrubin <rubinowyblask@meow.li>2026-05-22 13:42:51 +0200
committerrubin <rubinowyblask@meow.li>2026-05-22 13:42:51 +0200
commit77dc79afe5fd909fb1fe0a3cc668db2763b82fb8 (patch)
treefbca4863a432f33822f8ee97d9fe39c15462b401 /logging.h
import repository
Signed-off-by: rubinowy blask <rubinowyblask@encore.hosts.lumine>
Diffstat (limited to 'logging.h')
-rw-r--r--logging.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/logging.h b/logging.h
new file mode 100644
index 0000000..6ad5729
--- /dev/null
+++ b/logging.h
@@ -0,0 +1,29 @@
+#include <stdarg.h>
+#include <unistd.h>
+
+static void
+aura_printf(const char *fmt, ...)
+{
+	va_list args = { 0 };
+
+	printf("[%d] ", getpid());
+	va_start(args, fmt);
+	vprintf(fmt, args);
+	va_end(args);
+
+	return;
+}
+
+static void
+aura_fprintf(FILE *stream, const char *fmt, ...)
+{
+	va_list args = { 0 };
+
+	fprintf(stream, "[%d] ", getpid());
+	va_start(args, fmt);
+	vfprintf(stream, fmt, args);
+	va_end(args);
+
+	return;
+}
+