feat(zlog): colored level text and styled timestamps and scopes
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m27s

This commit is contained in:
2025-02-24 14:01:49 +01:00
parent dd98e63bcb
commit a21d84cfcf
2 changed files with 25 additions and 18 deletions

View File

@@ -66,24 +66,24 @@ pub fn main() void {
This will result in the following output:
```
[2024-08-28 22:22] debug(main): Debug message 42
[2024-08-28 22:22] info(main): Info message { 1, 2, 3, 4 }
[2024-08-28 22:22] info(main): Info message "This is a test"
[2024-08-28 22:22] warning(main): Warning message main.Options = enum {
[2025-02-24 13:00:08] [debug](main): Debug message 42
[2025-02-24 13:00:08] [info](main): Info message { 1, 2, 3, 4 }
[2025-02-24 13:00:08] [info](main): Info message "This is a test"
[2025-02-24 13:00:08] [warning](main): Warning message main.Options = enum {
a,
b,
c,
} = a
[2025-02-24 13:00:08] [error](main): Error message main.Struct = struct {
.a = 42,
.b = true,
.c = []u16: { 1, 2, 3, 4, 5 },
.d = { 115, 116, 114, 105, 110, 103 },
.e = main.Options = enum {
a,
b,
c,
} = a
[2024-08-28 22:22] error(main): Error message main.Struct = struct {
.a = 42,
.b = true,
.c = []u16: { 1, 2, 3, 4, 5 },
.d = { 115, 116, 114, 105, 110, 103 },
.e = main.Options = enum {
a,
b,
c,
} = b,
} = b,
}
```