| ... | @@ -52,8 +52,13 @@ pub const LineInfo = struct { | ... | @@ -52,8 +52,13 @@ pub const LineInfo = struct { |
| 52 | | 52 | |
| 53 | var stderr_mutex = std.Mutex.init(); | 53 | var stderr_mutex = std.Mutex.init(); |
| 54 | | 54 | |
| 55 | /// Deprecated. Use `std.log` functions for logging. | 55 | /// Deprecated. Use `std.log` functions for logging or `std.debug.print` for |
| 56 | pub fn warn(comptime fmt: []const u8, args: var) void { | 56 | /// "printf debugging". |
| | 57 | pub const warn = print; |
| | 58 | |
| | 59 | /// Print to stderr, unbuffered, and silently returning on failure. Intended |
| | 60 | /// for use in "printf debugging." Use `std.log` functions for proper logging. |
| | 61 | pub fn print(comptime fmt: []const u8, args: var) void { |
| 57 | const held = stderr_mutex.acquire(); | 62 | const held = stderr_mutex.acquire(); |
| 58 | defer held.release(); | 63 | defer held.release(); |
| 59 | const stderr = io.getStdErr().writer(); | 64 | const stderr = io.getStdErr().writer(); |