Replies: 5 comments
-
It's a feature that I'd considered adding, and something I may revisit in the near future. In the interim however, you can achieve the desired behaviour using echo "unrecoverable error" | tee -a output.log | flog -l fault -s uk.co.fidgetbox -c general Which sends the log message to Apple's unified logging system and also appends it to the There are likely other possible variations of this that may read better syntactically, though some may depend on the shell being using. For example, we can drop the tee -a output.log <<< "unrecoverable error" | flog -l fault -s uk.co.fidgetbox -c general This would be a trade-off in portability however, and would be limited to shells like Regardless, keep an eye on the project board or this issue page for updates, and thanks for the suggestion. 👍🏻 |
Beta Was this translation helpful? Give feedback.
-
@JayBrown Release 1.3.0 introduces a new |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! It seems to work so far… need to do more RL testing from within shell scripts. Additionally, you could also mimic the way
So you'd have the date & time followed by two whitespaces, then the process ID (the subsystem from You could also add the category (from
|
Beta Was this translation helpful? Give feedback.
-
Addendum: you could also introduce |
Beta Was this translation helpful? Give feedback.
-
I think it would be a worthy addition. 👍🏻 Mimicking the format of |
Beta Was this translation helpful? Give feedback.
-
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 toflog
, so we can additionally either write directly to a file, e.g. with…or tell
flog
to 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
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.Beta Was this translation helpful? Give feedback.
All reactions