On my linux i can run
sudo journalctl -u tor@default to see tor log. where is the log file stored on the system. Maybe a unix.stakexchange kind of question but i opt to ask it here
Usually Tor stores its log files in
/var/log/tor. Depending from the specific settings you'll find
torrc specifies where the log file is stored and what kind of information is logged. So if you don't find the above mentioned files please have a look into your configuration.
stderr of a systemd unit are sent to syslog. On my machine(Kali distro) it is stored in
/var/log/syslog. So to see tor unit output run
cat /var/log/syslog | grep tor -i
In case someone needs to monitor tor unit i found a better way. Adding
--follow flag to
journalctl makes it to continuously print new entries as they are appended to the journal. You can then pipe it to a parser and react based on it.
In one of your termianl tabs run
sudo journalctl -f -u tor@default | grep bootstrapped -i
in another tab do
sudo systemctl restart tor
You will see the results are appended to the first terminal as they are appended to the systemd journal