File listing --list showing up on stdout despite log file being provided #796

Closed
opened 2023-12-01 12:40:08 +00:00 by atelszewski · 3 comments

What I'm trying to do and why

I would like the listing of files (--list) be logged to the log file exclusively.

Steps to reproduce

declare -r repository=complete_system-borgbase
declare -r log_file=/var/log/borgmatic/${repository}.log

borgmatic                                         \
    --log-file-verbosity=2 --log-file=${log_file} \
    create --repository=${repository} --list

Actual behavior

The listing of files is, in addition to the log file, is logged on stdout.

Expected behavior

The listing of files should be logged exclusively to the log file if it is provided.

Other notes / implementation ideas

No response

borgmatic version

1.8.4

borgmatic installation method

No response

Borg version

1.2.4

Python version

Python 3.9.18

Database version (if applicable)

No response

Operating system and version

NAME=Slackware VERSION="15.0" ID=slackware VERSION_ID=15.0 PRETTY_NAME="Slackware 15.0 x86_64" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:slackware:slackware_linux:15.0" HOME_URL="http://slackware.com/" SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/" BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/" VERSION_CODENAME=stable

### What I'm trying to do and why I would like the listing of files (`--list`) be logged to the log file exclusively. ### Steps to reproduce ``` declare -r repository=complete_system-borgbase declare -r log_file=/var/log/borgmatic/${repository}.log borgmatic \ --log-file-verbosity=2 --log-file=${log_file} \ create --repository=${repository} --list ``` ### Actual behavior The listing of files is, in addition to the log file, is logged on `stdout`. ### Expected behavior The listing of files should be logged exclusively to the log file if it is provided. ### Other notes / implementation ideas _No response_ ### borgmatic version 1.8.4 ### borgmatic installation method _No response_ ### Borg version 1.2.4 ### Python version Python 3.9.18 ### Database version (if applicable) _No response_ ### Operating system and version NAME=Slackware VERSION="15.0" ID=slackware VERSION_ID=15.0 PRETTY_NAME="Slackware 15.0 x86_64" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:slackware:slackware_linux:15.0" HOME_URL="http://slackware.com/" SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/" BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/" VERSION_CODENAME=stable
Owner

borgmatic logs "answers" like file listings to the console by default, because it doesn't know whether your log file is intended to be exclusive or just extra logging. To make it exclusive, add --verbosity -2 to your borgmatic command-line, and that will disable all console output.

Let me know how that works out for you!

borgmatic logs "answers" like file listings to the console by default, because it doesn't know whether your log file is intended to be exclusive or just extra logging. To make it exclusive, add `--verbosity -2` to your borgmatic command-line, and that will disable all console output. Let me know how that works out for you!
witten added the
question / support
label 2023-12-01 16:39:22 +00:00
Author

Hi,

Aye, that did the trick!

Thank you. :-)

--
Best regards,
Andrzej Telszewski

Hi, Aye, that did the trick! Thank you. :-) -- Best regards, Andrzej Telszewski
Owner

Glad to hear that did it!

Glad to hear that did it!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#796
No description provided.