paperless-gpt: Add log file to service definition #870

Open
opened 2025-11-20 04:55:30 -05:00 by saavagebueno · 0 comments
Owner

Originally created by @taker218 on GitHub (Apr 7, 2025).

🌟 Briefly describe the feature

Add a log file for the paperless-gpt container

📝 Detailed description

I just had a problem with my paperless-gpt running via the script and wanted to have a look at the logs.
I haven't found any log in the container and found a workaround in the paperless-gpt repo issues.

The workaround is:
journalctl -u paperless-gpt -f

But having a dedicated log file would be a lot easier in most instances.

For my case I added the following two lines to my paperless-gpt.service file:

StandardOutput=append:/var/log/paperless-gpt.log
StandardError=append:/var/log/paperless-gpt.log

This appends the log to the file.
To always create a new file when the container or service is started you could use the following.

StandardOutput=file:/var/log/paperless-gpt.log
StandardError=file:/var/log/paperless-gpt.log

Both versions are working just fine, I think the first one with appending the log, should be the standard here.

💡 Why is this useful?

I found some issues in the paperless-gpt repo of people wondering where the logs are stored, when running the lxc-container. Since paperless-gpt is designed to run as a docker container, the log output is going to STDOUT/STDERROR.
Having dedicated log files for it would make looking for the logs a lot easier.

Originally created by @taker218 on GitHub (Apr 7, 2025). ### 🌟 Briefly describe the feature Add a log file for the paperless-gpt container ### 📝 Detailed description I just had a problem with my paperless-gpt running via the script and wanted to have a look at the logs. I haven't found any log in the container and found a workaround in the paperless-gpt repo issues. The workaround is: `journalctl -u paperless-gpt -f` But having a dedicated log file would be a lot easier in most instances. For my case I added the following two lines to my paperless-gpt.service file: ``` StandardOutput=append:/var/log/paperless-gpt.log StandardError=append:/var/log/paperless-gpt.log ``` This appends the log to the file. To always create a new file when the container or service is started you could use the following. ``` StandardOutput=file:/var/log/paperless-gpt.log StandardError=file:/var/log/paperless-gpt.log ``` Both versions are working just fine, I think the first one with appending the log, should be the standard here. ### 💡 Why is this useful? I found some issues in the paperless-gpt repo of people wondering where the logs are stored, when running the lxc-container. Since paperless-gpt is designed to run as a docker container, the log output is going to STDOUT/STDERROR. Having dedicated log files for it would make looking for the logs a lot easier.
saavagebueno added the enhancement label 2025-11-20 04:55:30 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#870