diff --git a/docs/source/docs/troubleshooting/unix-commands.md b/docs/source/docs/troubleshooting/unix-commands.md index 4f8e5e3fd..252df1df7 100644 --- a/docs/source/docs/troubleshooting/unix-commands.md +++ b/docs/source/docs/troubleshooting/unix-commands.md @@ -122,11 +122,13 @@ systemctl status photonvision View the PhotonVision logs: ``` -journalctl -u photonvision +journalctl --output cat -u photonvision ``` View the PhotonVision logs in real-time: ``` -journalctl -u photonvision -f +journalctl --output cat -u photonvision -f ``` + +`--output cat` is used to prevent journalctl from printing its own timestamps, because we log our own timestamps. diff --git a/photon-server/src/main/java/org/photonvision/server/RequestHandler.java b/photon-server/src/main/java/org/photonvision/server/RequestHandler.java index fbc7151d4..d3ab08adb 100644 --- a/photon-server/src/main/java/org/photonvision/server/RequestHandler.java +++ b/photon-server/src/main/java/org/photonvision/server/RequestHandler.java @@ -435,7 +435,7 @@ public class RequestHandler { // dmesg = output all kernel logs since current boot // cat /var/log/kern.log = output all kernel logs since first boot shell.executeBashCommand( - "journalctl -u photonvision.service > " + "journalctl -a --output cat -u photonvision.service | sed -E 's/\\x1B\\[(0|30|31|32|33|34|35|36|37)m//g' >" + tempPath.toAbsolutePath() + " && dmesg > " + tempPath2.toAbsolutePath());