I have a container that has a file called “Container_ID.json.log” which is currently at 6G.
I know that it is not a good practice to simply rotate this log manually (Doing >/log/…json.log) since it can break the JSON Structure and generate some problems.
So, my question is: How can i rotate this log? Lets say, i don’t want it to pass 1G max, or how do i clear it the correct way?
Stopping the container and and bringing it back again is not practical for me.
I am sorry if this seems as a newbie question but the truth is i am a beginner at docker. Really have no idea on how to do this - And i do not want to do things not following best practices, or things that can create other problems.
Thank you