Avoid new log file when new instance of container with number

Open
#22 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
docker, docker-compose

Research direction

The issue names no files, tests, or entry points; start by searching the repository for the logic that derives log filenames from container names and inspect any related tests. Done means defining behavior that keeps one log across docker-compose scale-out and scale-in while preserving logs for the active container.

Written by the indexing model from the issue text.

Description

We deploy new releases in a new container with docker-compose --scale (out -> test -> in).

Then it creates a new container with a number in the name, like app_api_13 and next deploy scale out to app_api_14, and delete old app_api_13 at scale in ..... the log file follow the new containers name after each deploy, then we have lot of log files:

app_api_10.log  app_api_11.log  app_api_12.log  app_api_13.log  app_api_14.log  app_api_9.log  

when just last log app_api_14.log is the container running.

Is there are way to avoid number in log and maintain just one log, avoid number?

Dominant language
Go
Stars
255
Forks
37
Avg merge
37m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from umputun/docker-logger

All issues in umputun/docker-logger

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.