4 ms·
Another thing you can do is just use 'logger' and the syslog. You kinda have to be comfortable with viewing system logging, though; it's not for everyone - for
by vacri 9y ago
Another thing you can do is just use 'logger' and the syslog. You kinda have to be comfortable with viewing system logging, though; it's not for everyone - for example, I'm using sudo below just because I haven't set my user to view systemd's journal yet.
$ logger hello
$ logger <<EOF
> this is a multiline
> logging message
> EOF
$ sudo journalctl -t vacri
-- Logs begin at Fri 2017-09-29 10:40:49 AEST, end at Mon 2017-10-02 23:44:13 AEDT
Oct 02 23:40:24 myhost vacri[12320]: hello
Oct 02 23:48:48 myhost vacri[12460]: this is a multiline
Oct 02 23:48:48 myhost vacri[12460]: logging message
syslog is good for some use-cases (eg centralisation), and not so good for others. I imagine most people would prefer your directory-of-easily-findable-history.