[Borgbackup] borg verbose leaves visual garbage on screen

Sitaram Chamarty sitaramc at gmail.com
Tue Feb 19 08:31:05 EST 2019


On Sun, Feb 17, 2019 at 09:40:32AM +0530, Sitaram Chamarty wrote:
> On Sat, Feb 16, 2019 at 10:50:00PM +0200, Panayotis Katsaloulis wrote:
> > On 16 Feb 2019, 20:12 +0200, Thomas Waldmann <tw at waldmann-edv.de>, wrote:
> > > > # borg create -v --progress --list ...
> > >
> > > --progress and --list are not intended to be used together.
> > 
> > Indeed, if only one of these is used, then there’s no visual conflict.
> > But, for my eyes, both are vital information fo how well a backup is running.
> > I don’t even understand why irrelevant files should be displayed there, since only changed files are visible.
> > And why it should be a conflict.
> > 
> > Sorry for asking this, but I really love this software and, even if this behaviour is “not as intended”, maybe it should be though over again?
> 
> hate to be a "me too", but... "me too".  I've always had this
> problem, but never asked.
> 
> Would using a BORG_LOGGING_CONF help separate the two streams?
> 
> If it does, can I please request a bare bones minimal example in
> the man page, instead of a link to the much more generic
> **python** documentation.
> 
> To paraphrase Larry Wall (or someone like him anyway), that conf
> format makes hard things possible, but it also makes easy things
> hard.
> 
> A quick example that just gets INFO messages into a file, right
> in the borg man page, would be *highly* appreciated by anyone
> who is not already familiar with python's logging conf file
> format and the arcana of "handlers", "loggers", and
> "formatters".

Panayotis

As I suspected, using BORG_LOGGING_CONF helps.  This is the
minimal conf I could come up with (see end of this mail).  As
you can see, it's pretty verbose and roundabout, for what should
have been as simple as "--logfile=/tmp/borg.log".

For people who will respond saying "aah but python's logging
library is much more powerful and it can [...]", I would like to
humbly state that a **user** of borg should not need to know how
to use one of the libraries that borg **developers** chose to
use.  Certainly, allow power users to avail this extra power and
flexibility, but the simplest and most basic use of it should
not require such knowledge.

rgds
sitaram

Copy the below text in a file, and point the environment
variable BORG_LOGGING_CONF to this file before running borg.
With that, the --progress comes to STDERR as before, while the
--list goes to the file you designated in the "args" line.  I
suggest you also use "--filter=AME".

    [loggers]
    keys=root

    [handlers]
    keys=hand01

    [formatters]
    keys=form01

    [logger_root]
    level=NOTSET
    handlers=hand01

    [handler_hand01]
    class=FileHandler
    level=INFO
    formatter=form01
    args=('/tmp/borg.log', 'w')

    [formatter_form01]
    format=%(asctime)s %(levelname)s %(message)s
    datefmt=
    class=logging.Formatter


More information about the Borgbackup mailing list