diff options
| author | rubin <rubinowyblask@meow.li> | 2026-05-22 13:42:51 +0200 |
|---|---|---|
| committer | rubin <rubinowyblask@meow.li> | 2026-05-22 13:42:51 +0200 |
| commit | 77dc79afe5fd909fb1fe0a3cc668db2763b82fb8 (patch) | |
| tree | fbca4863a432f33822f8ee97d9fe39c15462b401 /logging.h | |
import repository
Signed-off-by: rubinowy blask <rubinowyblask@encore.hosts.lumine>
Diffstat (limited to 'logging.h')
| -rw-r--r-- | logging.h | 29 |
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; +} + |
