Karg  v0.2.0
The kernel of CargOS
log.h File Reference
#include <stddef.h>

Go to the source code of this file.

Macros

#define log_debug(fmt, ...)    klogf(LOG_SEVERITY_DEBUG, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)
 
#define log_info(fmt, ...)    klogf(LOG_SEVERITY_INFO, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)
 
#define log_warning(fmt, ...)    klogf(LOG_SEVERITY_WARNING, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)
 
#define log_error(fmt, ...)    klogf(LOG_SEVERITY_ERROR, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)
 
#define log_critical(fmt, ...)    klogf(LOG_SEVERITY_CRITICAL, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)
 
#define log_panic(fmt, ...)
 

Enumerations

enum  log_severity_t {
  LOG_SEVERITY_DEBUG , LOG_SEVERITY_INFO , LOG_SEVERITY_WARNING , LOG_SEVERITY_ERROR ,
  LOG_SEVERITY_CRITICAL , LOG_SEVERITY_PANIC
}
 

Functions

void klogf (log_severity_t severity, const char *fmt,...)
 

Macro Definition Documentation

◆ log_critical

#define log_critical (   fmt,
  ... 
)     klogf(LOG_SEVERITY_CRITICAL, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)

◆ log_debug

#define log_debug (   fmt,
  ... 
)     klogf(LOG_SEVERITY_DEBUG, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)

◆ log_error

#define log_error (   fmt,
  ... 
)     klogf(LOG_SEVERITY_ERROR, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)

◆ log_info

#define log_info (   fmt,
  ... 
)     klogf(LOG_SEVERITY_INFO, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)

◆ log_panic

#define log_panic (   fmt,
  ... 
)
Value:
{ \
klogf(LOG_SEVERITY_PANIC, "%s: " fmt "\n", _MODULE_NAME, \
##__VA_ARGS__); \
unreachable(); \
}
@ LOG_SEVERITY_PANIC
Definition: log.h:11

◆ log_warning

#define log_warning (   fmt,
  ... 
)     klogf(LOG_SEVERITY_WARNING, "%s: " fmt "\n", _MODULE_NAME, ##__VA_ARGS__)

Enumeration Type Documentation

◆ log_severity_t

Enumerator
LOG_SEVERITY_DEBUG 
LOG_SEVERITY_INFO 
LOG_SEVERITY_WARNING 
LOG_SEVERITY_ERROR 
LOG_SEVERITY_CRITICAL 
LOG_SEVERITY_PANIC 

Function Documentation

◆ klogf()

void klogf ( log_severity_t  severity,
const char *  fmt,
  ... 
)