1Logging
2~~~~~~~
3
4Borg writes all log output to stderr by default. But please note that something
5showing up on stderr does *not* indicate an error condition just because it is
6on stderr. Please check the log levels of the messages and the return code of
7borg for determining error, warning or success conditions.
8
9If you want to capture the log output to a file, just redirect it:
10
11::
12
13    borg create repo::archive myfiles 2>> logfile
14
15
16Custom logging configurations can be implemented via BORG_LOGGING_CONF.
17
18The log level of the builtin logging configuration defaults to WARNING.
19This is because we want Borg to be mostly silent and only output
20warnings, errors and critical messages, unless output has been requested
21by supplying an option that implies output (e.g. ``--list`` or ``--progress``).
22
23Log levels: DEBUG < INFO < WARNING < ERROR < CRITICAL
24
25Use ``--debug`` to set DEBUG log level -
26to get debug, info, warning, error and critical level output.
27
28Use ``--info`` (or ``-v`` or ``--verbose``) to set INFO log level -
29to get info, warning, error and critical level output.
30
31Use ``--warning`` (default) to set WARNING log level -
32to get warning, error and critical level output.
33
34Use ``--error`` to set ERROR log level -
35to get error and critical level output.
36
37Use ``--critical`` to set CRITICAL log level -
38to get critical level output.
39
40While you can set misc. log levels, do not expect that every command will
41give different output on different log levels - it's just a possibility.
42
43.. warning:: Options ``--critical`` and ``--error`` are provided for completeness,
44             their usage is not recommended as you might miss important information.
45