Skip to content

Logging Change Suggestion #9659

Closed
Closed

Description

@quietquark

Borg 1.4.x has some rather verbose logging when rebuilding/synchronizing the cache. Currently these logs are logged at the INFO level (and they result in one line per archive). On repositories with a large archive count, they result in unecessary log flooding.

It seems more appropriate to log these specific lines at the DEBUG level instead of INFO.

The lines/logs in question are:

https://github.com/borgbackup/borg/blob/1.4-maint/src/borg/cache.py#L872
https://github.com/borgbackup/borg/blob/1.4-maint/src/borg/cache.py#L875
https://github.com/borgbackup/borg/blob/1.4-maint/src/borg/cache.py#L879

The above lines can be logged at the DEBUG level to reduce some noisy logs.

Without these logs (at INFO), the logs become much more readable:

Synchronizing chunks cache...
Archives: %d, w/ cached Idx: %d, w/ outdated Idx: %d, w/o cached Idx: %d.
Done.

Activity

  1. ThomasWaldmann commented on May 25, 2026

    @ThomasWaldmann
    Member

    The default logging level of borg is WARNING, so you won't see INFO output.

    If you give -v or --info, you are explicitly requesting it to be more verbose.

    So, whether these lines are INFO or DEBUG is a matter of preference and also might depend on whether you use it interactively, looking at it and waiting for it (wondering what it does right now) or in a cronjob, capturing the log output and looking at it later.

  2. quietquark commented on May 26, 2026

    @quietquark
    Author

    Looking at the flow (in cache.py), there are both INFO and DEBUG output statements and the rest of the logs seem approrpriate for the output (and level) they produce.

    These specific lines are producing lines PER archive which (IMHO) belongs in the DEBUG level since they are going to be pretty verbose for larger repos. The INFO logs are very useful to give you the overall flow (and times) for the operation.

    Even when running via cron, these end up being pretty noisy when considering the rest of the logs and don't really add much to justify being at the INFO level.

    Please consider downgrading these specific lines to DEBUG level making the overall logging much more appropriate, useful and less noisy.

  3. added this to the 1.4.6 milestone on Aug 12, 2026
  4. added 2 commits that reference this issue on Aug 27, 2026
    bd8f53e
    6bd22a4
  5. ThomasWaldmann commented on Aug 27, 2026

    @ThomasWaldmann
    Member

    Fixed by #10217.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions