From ae44478b30d890fe0fb04022f44d474dcdcc3f9d Mon Sep 17 00:00:00 2001 From: Lassi Pulkkinen Date: Thu, 31 Oct 2024 03:11:21 +0200 Subject: Initial commit (import old repo) --- trace/root.ha | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 trace/root.ha (limited to 'trace/root.ha') diff --git a/trace/root.ha b/trace/root.ha new file mode 100644 index 0000000..dbae0d1 --- /dev/null +++ b/trace/root.ha @@ -0,0 +1,21 @@ +use fmt; + +export let root = tracer { + log = &root_log, +}; + +let cur_root = &silent; + +export fn setroot(tr: *tracer) void = { + cur_root = tr; +}; + +fn root_log( + tr: *tracer, + ctx: nullable *context, + lvl: level, + fmt: str, + fields: fmt::field... +) void = { + log(cur_root, ctx, lvl, fmt, fields...); +}; -- cgit v1.2.3