Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Add command to clear logs in container #2422

Open
vnwonah opened this issue Apr 7, 2020 · 1 comment
Open

Feature Request: Add command to clear logs in container #2422

vnwonah opened this issue Apr 7, 2020 · 1 comment

Comments

@vnwonah
Copy link

vnwonah commented Apr 7, 2020

The docker logs <container-name> command comes in handy during development to inspect console logs. After a while of running a container, it can become cumbersome to go through.

I am proposing a docker logs clear <container-name> which clears all logs in a specified container.

This command will be immediately useful to me and several other developers I believe who use custom scripts to achieve this behaviour.

@cpuguy83
Copy link
Collaborator

You can enable log rotation on the container, as well as filter logs with "--tail", "--since", and "--until".
If you change to the "local" log driver, rotation is enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants