getodk / getodk/central

Don't log service logs to ~/.pm2/logs/

Open
#376 2 comments 0 reactions 0 assignees View on GitHub
help wanted ops
Dominant language
JavaScript
Stars
226
Forks
235
Avg merge
2d 22h
Merged PRs (30d)
19

Description

In #293, we stopped pm2 from double-logging to stdout/stderr. However, it logs like pm2 is now logging to ~/.pm2/logs/ in the service container in addition to stdout/stderr. We don't use the logs in ~/.pm2/logs/, so those logs end up taking up space they don't need to.

From a quick look, it looks like we can stop the logging to ~/.pm2/logs/ by setting `out_file` and `error_file` to /dev/null: see the "Disable logging" section [here](https://pm2.keymetrics.io/docs/usage/log-management/). [This page](https://pm2.keymetrics.io/docs/usage/application-declaration/#log-files) similarly indicates that the default of `out_file` and `error_file` is logging to ~/.pm2/logs/.

Contributor guide

No contributing guide indexed for this repository

Research direction

The issue points to PM2's out_file and error_file settings and the service container; first locate the application declaration used to start the service and compare its logging behavior with the linked PM2 log-management guidance. Done means PM2 no longer creates or grows ~/.pm2/logs/ while service output remains available on stdout/stderr.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.