Reduce default log level

This commit is contained in:
Ali Mashtizadeh 2023-10-01 20:30:12 -04:00
parent e2be315cfc
commit 64818e1337
2 changed files with 7 additions and 3 deletions

View File

@ -29,7 +29,10 @@ NO_RETURN void Debug_Assert(const char *fmt, ...);
// Warning
#define Warning(_module, _format, ...) kprintf(#_module ": " _format, ##__VA_ARGS__)
// Normal Logging
#define Log(_module, _format, ...) kprintf(#_module ": " _format, ##__VA_ARGS__)
#define Log(_module, _format, ...) \
if (SYSCTL_GETINT(log_##_module) >= 1) { \
kprintf(#_module ": " _format, ##__VA_ARGS__); \
}
// Debug Logging
#define DLOG(_module, _format, ...) \
if (SYSCTL_GETINT(log_##_module) >= 5) { \

View File

@ -24,8 +24,9 @@
SYSCTL_STR(kern_ostype, SYSCTL_FLAG_RO, "OS Type", "Castor") \
SYSCTL_INT(kern_hz, SYSCTL_FLAG_RW, "Tick frequency", 100) \
SYSCTL_INT(time_tzadj, SYSCTL_FLAG_RW, "Time zone offset in seconds", 0) \
SYSCTL_INT(log_syscall, SYSCTL_FLAG_RW, "Syscall log level", 0) \
SYSCTL_INT(log_loader, SYSCTL_FLAG_RW, "Loader log level", 0) \
SYSCTL_INT(log_syscall, SYSCTL_FLAG_RW, "Syscall log level", 1) \
SYSCTL_INT(log_loader, SYSCTL_FLAG_RW, "Loader log level", 1) \
SYSCTL_INT(log_vfs, SYSCTL_FLAG_RW, "VFS log level", 1) \
SYSCTL_INT(log_o2fs, SYSCTL_FLAG_RW, "O2FS log level", 0) \
SYSCTL_INT(log_ide, SYSCTL_FLAG_RW, "IDE log level", 0)