Add time to log. #233
ozgurerdogan
started this conversation in
General
Replies: 2 comments 2 replies
-
you want to prepend the date/time to every line? |
Beta Was this translation helpful? Give feedback.
1 reply
-
Pipe the output through this:
yes, gpt4 did this :) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How can I add full date to logs. My cron is:
sh /Backup-Vms.sh > /Backup-Vms.log 2>&1
and is sh:
ssh boxtobackup "zfs-autobackup -v s1d1 D8 --keep-source=40 --keep-target=40 --strip-path=2 --clear-mountpoint --clear-refreservation --no-holds --snapshot-format %Y-%m-%d-%H:%M:%S --force --destroy-missing=10d";
And logs are:
Synchronising
[Source] D2/vm-138-disk-0: sending to D8/vm-138-disk-0
[Source] D2/vm-138-disk-0@2023-11-06-17:00:03: Destroying
[Target] D8/vm-138-disk-0@2023-11-06-17:00:03: Destroying
[Target] D8/vm-138-disk-0@2023-11-12-11:00:03: receiving incremental
[Source] D2/vm-179-disk-0: sending to D8/vm-179-disk-0
So can I prepend date and time to logs?
Beta Was this translation helpful? Give feedback.
All reactions