lib/pluck/src/logger.zig

daab053ee43316e1809a84551d573ddd1e5bf3d2

 1 const sys = @import("sys");
 2 
 3 const std_log = if (sys.capabilities.current.isFreestanding()) struct {
 4     pub fn warn(comptime fmt: []const u8, args: anytype) void {
 5         _ = fmt;
 6         _ = args;
 7     }
 8 
 9     pub fn err(comptime fmt: []const u8, args: anytype) void {
10         _ = fmt;
11         _ = args;
12     }
13 
14     pub fn info(comptime fmt: []const u8, args: anytype) void {
15         _ = fmt;
16         _ = args;
17     }
18 } else @import("std").log;
19 
20 pub fn warn(comptime fmt: []const u8, args: anytype) void {
21     std_log.warn(fmt, args);
22 }
23 
24 pub fn err(comptime fmt: []const u8, args: anytype) void {
25     std_log.err(fmt, args);
26 }
27 
28 pub fn info(comptime fmt: []const u8, args: anytype) void {
29     std_log.info(fmt, args);
30 }