:: Re: [DNG] Docker daemon logrotate
Etusivu
Poista viesti
Vastaa
Lähettäjä: Tom
Päiväys:  
Vastaanottaja: dng
Aihe: Re: [DNG] Docker daemon logrotate


> On 17 Apr 2024, at 21:56, Olaf Meeuwissen <paddy-hack@???> wrote:
>
> Hi Tom,
>
> Tom via Dng <dng@???> writes:
>
>> [...]
>> I guess I’ll have to configure debian logrotate config myself if the
>> daemon doesn’t handle that. I’m kind of surprised that it’s not a more
>> widespread issue.
>
> Here's what I use to get the Docker daemon logs handled by logrotate
>
>  $ cat /etc/logrotate.d/docker
>  /var/log/docker.log {
>    compress
>    copytruncate
>    delaycompress
>  }

>
> Note that this runs the risk of losing a smallish window of log messages
> when rotating, IIRC.
>
>> Does systemd/journald not require any logrotate.d config?
>
> Under systemd the Docker daemon logs to the journal which is rotated
> automatically.
>
> Hope this helps,
> --
> Olaf Meeuwissen


Thanks Olaf.

I’ll add that config into my systems.

Tom