You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to be able run multiple instances of pc concurrently and have each use a distinct log file for process-compose logs. Currently all instances share the same file (/tmp/process-compose-$USER.log), which causes the file to be truncated each time a new instance starts, and makes it difficult to debug individual pc instances.
example result of failing to log file while 2 instances are started:
> tail -f /tmp/process-compose-$USER.log
23-07-19 11:39:37.693 INF Process Compose v0.51.4
23-07-19 11:39:37.693 INF Global shell command: bash -c
23-07-19 11:39:37.693 INF Loaded project from /home/adrian/code/rhinofi/rhino-core/process-compose.yaml
23-07-19 11:39:37.693 INF start http server listening :8080
23-07-19 11:39:37.693 DBG Spinning up 1 processes. Order: ["log-test"]
23-07-19 11:39:37.694 INF log-test started
tail: /tmp/process-compose-adrian.log: file truncated
23-07-19 11:39:42.180 INF Process Compose v0.51.4
23-07-19 11:39:42.180 INF Global shell command: bash -c
23-07-19 11:39:42.181 INF Loaded project from /home/adrian/code/rhinofi/rhino-core/process-compose.yaml
23-07-19 11:39:42.181 INF start http server listening :8080
23-07-19 11:39:42.181 DBG Spinning up 1 processes. Order: ["log-test"]
23-07-19 11:39:42.181 INF log-test started
23-07-19 11:39:46.085 INF log-test exited with status -1
23-07-19 11:39:46.085 INF Project completed
23-07-19 11:39:46.085 DBG process log-test is in state Completed not shutting down
23-07-19 11:39:47.086 INF Thank you for using process-compose
23-07-19 11:39:47.147 INF log-test exited with status -1
23-07-19 11:39:47.147 INF Project completed
23-07-19 11:39:48.148 INF Thank you for using process-compose
Use Case:
running multiple instances of pc concurrently
Proposed Change:
Add a way to configure the log files location.
Who Benefits From The Change(s)?
Anyone who wants to run multiple instances of pc concurrently
Alternative Approaches
Each instance could be given a name and then the name could be prepended to each log line in shared file. By default, port could be used instead of a name (if not given), since that should be unique per instance. In this case, it would be good to be able to disable truncation of the log file on startup.
Another option could be to add PC_LOG_POSTFIX env var and use it (if defined) instead of USER for the log location.
The text was updated successfully, but these errors were encountered:
Feature Request
I'd like to be able run multiple instances of pc concurrently and have each use a distinct log file for process-compose logs. Currently all instances share the same file (
/tmp/process-compose-$USER.log
), which causes the file to be truncated each time a new instance starts, and makes it difficult to debug individual pc instances.example result of failing to log file while 2 instances are started:
Use Case:
running multiple instances of pc concurrently
Proposed Change:
Add a way to configure the log files location.
Who Benefits From The Change(s)?
Anyone who wants to run multiple instances of pc concurrently
Alternative Approaches
Each instance could be given a name and then the name could be prepended to each log line in shared file. By default, port could be used instead of a name (if not given), since that should be unique per instance. In this case, it would be good to be able to disable truncation of the log file on startup.
Another option could be to add
PC_LOG_POSTFIX
env var and use it (if defined) instead of USER for the log location.The text was updated successfully, but these errors were encountered: