My log (accessed via docker-compose logs -f lemmy has gotten very noisy since my instance has been federating with several others. It makes it harder to troubleshoot odd behavior and I’m concerned that it’s going to quickly fill up my server’s disk with logs. What can I do to improve this?

  • poVoqA
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    1 year ago

    Funny… I was just getting annoyed by the same.

    I think the culprit is the RUST_LOG env variable where by default everything is set to “info” or “debug”. I had it on “info”, but that was still very verbose. I am currently trying it with all “warn”.

    Edit: the pictrs log is also overly verbose by default it seems.

  • PTZ@lemmy.ptznetwork.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I just used the Docker logging options to cap the stdout/stderr log to a reasonable size. Just add logging options to each chatty service and change 25m to whatever makes sense for your environment.

    docker-compose.yml:

    services:
      ....
      lemmy:
        ...
         logging:                                                                                                                                                                                 
            options:                                                                                                                                                                               
              max-size: 25m
      pictrs:
        ...
           logging:                                                                                                                                                                                 
            options:                                                                                                                                                                               
              max-size: 25m