SYSLOG(9) Hyra Kernel Developer’s Manual SYSLOG(9)
NAME
syslog - hyra system logging interface
SYNOPSIS
#include <sys/syslog.h>
void
kprintf(const char *fmt, ...);
void vkprintf(const char *fmt, va_list *ap);
DESCRIPTION
The Hyra syslog interface allows kernel logging. The kprintf() function allows writing a string with formatting.
The vkprintf() function allows passing a pointer to a va_list somewhere in memory. While essentially doing the same thing as kprintf()
The "%c" format specifier is for characters (single byte)
The "%s" format specifier is for strings
The "%d" format specifier is for base-10 values
The "%x" format specifier is for base-16 values
Is it recommend to use macros like KINFO() or similar for standard logging.
All of these macros are defined in the sys/syslog.h header. But require __THIS_MODULE to be defined by the __MODULE_NAME() macro found in sys/cdefs.h
AUTHORS
Ian Moffett <ian@osmora.org>
Hyra Jan 12 2024 Hyra