Reputation: 25778
My process output some log information to the console windows. When I run it as a background process, where can I find the output logs?
Upvotes: 14
Views: 23971
Reputation: 1649
If it's a systemd service you can run journalctl -u <service-name>
You can check for latest logs by clicking **SHIFT + G **
Make sure systems is installed
apt-get install systemd
Upvotes: 0
Reputation: 363817
Depends on the process and how you started it. If it writes to stdout
(which is probable, given that the output is usually to the terminal), you can redirect the output to a file with
command > logfile &
If you also want to log error message from stderr
, do
command > logfile 2> errorlogfile &
or
command > logfile 2>&1 &
to get everything in one file.
Upvotes: 24