enum Level [src]
Fields
errError: something has gone wrong. This might be recoverable or might
be followed by the program exiting.
warnWarning: it is uncertain if something has gone wrong or not, but the
circumstances would be worth investigating.
infoInfo: general messages about the state of the program.
debugDebug: messages only useful for debugging.
Members
- asText (Function)
Source
pub const Level = enum {
/// Error: something has gone wrong. This might be recoverable or might
/// be followed by the program exiting.
err,
/// Warning: it is uncertain if something has gone wrong or not, but the
/// circumstances would be worth investigating.
warn,
/// Info: general messages about the state of the program.
info,
/// Debug: messages only useful for debugging.
debug,
/// Returns a string literal of the given level in full text form.
pub fn asText(comptime self: Level) []const u8 {
return switch (self) {
.err => "error",
.warn => "warning",
.info => "info",
.debug => "debug",
};
}
}