std.log log to a file instead of to stderr
commits
By default save release logs to
`~/.local/state/<executable_name>/<executable_name>.log`. If executable
name can't be loaded for any reason the default will instead be in
`~/.cache/logs/out.log`.
If the `$HOME` environment variable can't be loaded logs will be saved
to `./logs/out.log` by default.
The log_to_file function can be used to easily swap out the std.log
function such that it writes logs to a `log` file in your current
working directory instead of writing to STDOUT.
The path to the log file can be configured by setting
`pub const log_to_file_path = "/absolute/or/relative/path/to/log/file";`
in your root source file, typically `src/main.zig` or similar.
The log_to_file function can be used to easily swap out the std.log
function such that it writes logs to a `log` file in your current
working directory instead of writing to STDOUT.
The path to the log file can be configured by setting
`pub const log_to_file_path = "/absolute/or/relative/path/to/log/file";`
in your root source file, typically `src/main.zig` or similar.