Is your feature request related to a problem? Please describe.
It would be nice to be able to write logs to a file too (in addition to writing to the unified log). For everyday macOS users, the unified log is very hard to comb through, so giving them an option to just open a regular log file would be a plus.
Describe the solution you'd like
Add either an -f or an -r option to flog, so we can additionally either write directly to a file, e.g. with
flog -f "$HOME/Library/Logs/uk.co.fidgetbox.log" -l fault -s uk.co.fidgetbox -c general 'unrecoverable failure'
…or tell flog to write to standard error, so we can redirect that to a file, e.g. with
flog -r -l fault -s uk.co.fidgetbox -c general 'unrecoverable failure' 2>> "$HOME/Library/Logs/uk.co.fidgetbox.log"
Describe alternatives you've considered
(none come to mind)
Additional context
The macOS-built-in logger program does not have an option to write to a file directly, but it has an option (-s) to write to stderr, so the user can redirect.
Is your feature request related to a problem? Please describe.
It would be nice to be able to write logs to a file too (in addition to writing to the unified log). For everyday macOS users, the unified log is very hard to comb through, so giving them an option to just open a regular log file would be a plus.
Describe the solution you'd like
Add either an
-for an-roption toflog, so we can additionally either write directly to a file, e.g. with…or tell
flogto write to standard error, so we can redirect that to a file, e.g. withDescribe alternatives you've considered
(none come to mind)
Additional context
The macOS-built-in
loggerprogram does not have an option to write to a file directly, but it has an option (-s) to write to stderr, so the user can redirect.