From 99be106bc83e00b446a6d168ace4063d1f36c740 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Fri, 9 Mar 2018 20:44:20 +0100 Subject: [PATCH] docs: improve logging docs, fixes #3549 --- docs/usage_general.rst.inc | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/docs/usage_general.rst.inc b/docs/usage_general.rst.inc index 38d05cc0b..f4a0d456e 100644 --- a/docs/usage_general.rst.inc +++ b/docs/usage_general.rst.inc @@ -86,8 +86,22 @@ If you have set BORG_REPO (see above) and an archive location is needed, use ``::archive_name`` - the repo URL part is then read from BORG_REPO. -Type of log output -~~~~~~~~~~~~~~~~~~ +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 @@ -238,7 +252,7 @@ Please note: (e.g. mode 600, root:root). -.. _INI: https://docs.python.org/3.5/library/logging.config.html#configuration-file-format +.. _INI: https://docs.python.org/3/library/logging.config.html#configuration-file-format .. _file-systems: