diff --git a/sys/include/kassert.h b/sys/include/kassert.h index 894a9d9..abcefb4 100644 --- a/sys/include/kassert.h +++ b/sys/include/kassert.h @@ -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) { \ diff --git a/sys/include/sysctl.h b/sys/include/sysctl.h index ff350d0..bd8e3c1 100644 --- a/sys/include/sysctl.h +++ b/sys/include/sysctl.h @@ -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)