Function logEnabled [src]
Determine if a specific log message level and scope combination are enabled for logging.
Prototype
pub fn logEnabled(comptime message_level: Level, comptime scope: @Type(.enum_literal)) bool
Parameters
message_level: Level
scope: @Type(.enum_literal)
Source
pub fn logEnabled(comptime message_level: Level, comptime scope: @Type(.enum_literal)) bool {
inline for (scope_levels) |scope_level| {
if (scope_level.scope == scope) return @intFromEnum(message_level) <= @intFromEnum(scope_level.level);
}
return @intFromEnum(message_level) <= @intFromEnum(level);
}