The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
klog.c File Reference
#include "klog.h"
#include "drivers/serial/serial.h"
#include "common/stdio.h"
#include "common/string.h"
#include "kernel/device/device.h"

Macros

#define KMSG_LINE   200

Functions

void klog_set_echo (void(*putchar)(char c))
 also write every log line with this function (the console during boot), or stop with NULL.
void klog_init (void)
 initialize the logging backend (brings up the serial port).
void klog (klog_level_t level, const char *fmt,...)
void klog_device_init (void)
 register /dev/kmsg: each line a program writes becomes an info line in the log (on the serial port).

Macro Definition Documentation

◆ KMSG_LINE

#define KMSG_LINE   200

Function Documentation

◆ klog_set_echo()

void klog_set_echo ( void(* putchar )(char c))

also write every log line with this function (the console during boot), or stop with NULL.

◆ klog_init()

void klog_init ( void )

initialize the logging backend (brings up the serial port).

call once, early in boot, before any KLOG_* macro is used.

◆ klog()

void klog ( klog_level_t level,
const char * fmt,
... )

◆ klog_device_init()

void klog_device_init ( void )

register /dev/kmsg: each line a program writes becomes an info line in the log (on the serial port).

call once the device registry is up.