[Borgbackup] logging questions

Sitaram Chamarty sitaramc at gmail.com
Sat May 14 01:06:31 EDT 2016


On 05/14/2016 04:50 AM, Steve Schow wrote:
> Ic.  Yea the INI docs you mentioned was greek to me so I will just

me too, but I -- eventually -- figured out a "bare minimum".

Here's what I use (put this in some file and point the env var
BORG_LOGGING_CONF to it when you run your borg command):

    [loggers]
    keys=root

    [handlers]
    keys=hand01

    [formatters]
    keys=form01

    [logger_root]
    level=NOTSET
    handlers=hand01

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

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

So many levels of indirection to basically set the output file name, the
log level, and the format!

PS: And now I'm looking at it, I don't know where that "F1" on the
format line came from, or if it is even needed!


More information about the Borgbackup mailing list