1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-29 11:16:43 +00:00
borg/docs/usage/general/logging.rst.inc
Thalian 19aa9825a8 [DOCS] #4587 – Make Sphinx warnings break docs build
general.rst and man_intro.rst both included usage_general.rst.inc, which resulted in three Sphinx warning "WARNING: duplicate label".
To prevent this we move all sections of usage_general into own include files and add a second usage_general file without the three labels.
2020-03-16 19:22:59 +01:00

44 lines
1.6 KiB
PHP

Logging
~~~~~~~
Borg writes all log output to stderr by default. But please note that something
showing up on stderr does *not* indicate an error condition just because it is
on stderr. Please check the log levels of the messages and the return code of
borg for determining error, warning or success conditions.
If you want to capture the log output to a file, just redirect it:
::
borg create repo::archive myfiles 2>> logfile
Custom logging configurations can be implemented via BORG_LOGGING_CONF.
The log level of the builtin logging configuration defaults to WARNING.
This is because we want Borg to be mostly silent and only output
warnings, errors and critical messages, unless output has been requested
by supplying an option that implies output (e.g. ``--list`` or ``--progress``).
Log levels: DEBUG < INFO < WARNING < ERROR < CRITICAL
Use ``--debug`` to set DEBUG log level -
to get debug, info, warning, error and critical level output.
Use ``--info`` (or ``-v`` or ``--verbose``) to set INFO log level -
to get info, warning, error and critical level output.
Use ``--warning`` (default) to set WARNING log level -
to get warning, error and critical level output.
Use ``--error`` to set ERROR log level -
to get error and critical level output.
Use ``--critical`` to set CRITICAL log level -
to get critical level output.
While you can set misc. log levels, do not expect that every command will
give different output on different log levels - it's just a possibility.
.. warning:: Options ``--critical`` and ``--error`` are provided for completeness,
their usage is not recommended as you might miss important information.