diff options
Diffstat (limited to 'lib/std/log.zig')
| -rw-r--r-- | lib/std/log.zig | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/std/log.zig b/lib/std/log.zig index 81bfc4ebb6..df11fe205b 100644 --- a/lib/std/log.zig +++ b/lib/std/log.zig @@ -80,6 +80,14 @@ pub fn logEnabled(comptime level: Level, comptime scope: @EnumLiteral()) bool { return @intFromEnum(level) <= @intFromEnum(std.options.log_level); } +pub const terminalMode = std.options.logTerminalMode; + +pub fn defaultTerminalMode() std.Io.Terminal.Mode { + const stderr = std.debug.lockStderr(&.{}).terminal(); + std.debug.unlockStderr(); + return stderr.mode; +} + /// The default implementation for the log function. Custom log functions may /// forward log messages to this function. /// |
