doc: tip for looking through log files generated by zlog
Some checks failed
Zig Project Action / Lint, Spell-check and test zig project (push) Failing after 31s

This commit is contained in:
2025-03-03 16:33:24 +01:00
parent a21d84cfcf
commit 22bff91df9

View File

@@ -95,6 +95,7 @@ For more details about the output customization see the configuration options of
- _stderr_ (default: `true`): Print log messages to stderr.
> [!CAUTION]
> Currently not working as log output is not appended and only the last log message will be in the resulting log file! This is a not-yet-implemented feature of the standard library of zig! See this [issue](https://github.com/ziglang/zig/issues/14375) for more details.
> For now you should instead leave this option as it is and pipe the corresponding stderr outputs to a logfile instead.
## Tips
@@ -111,3 +112,4 @@ The following list shows some tips on how to use logging more effectively. These
break :port try fmt.parseInt(u16, buf[0 .. len -| 1], 10);
};
```
- When looking through the output of the log (i.e. written to disk by `program 2> log`) the `log` file contains control code characters (*ansi*) for the colored outputs. You can still see them correctly with the following command `less -rf log`