carddav2fb icon indicating copy to clipboard operation
carddav2fb copied to clipboard

Quiet doesn't work

Open Wonko52 opened this issue 4 years ago • 2 comments

The command line option "-" or "--quiet" doesn't work. It displays the normal output.

# ./carddav2fb run -q
Downloading recent FRITZ!Box phonebook
Downloading vCard(s) from account xxx

Downloaded 489 vCard(s)
Downloaded 489 vCard(s) in total
Dissolving groups (e.g. iCloud)
Dissolved 0 group(s)
Filtering 489 vCard(s)
Filtered 0 vCard(s)
Contact without phone numbers will be skipped
...

Wonko52 avatar Mar 22 '20 12:03 Wonko52

Just guessing here: the quiet option is probably Symfony standard. It doesn't have any effect since we're using error_log instead of Symfony output for printing to be able to separate dumped date from progress. Easiest thing would be to remove that option.

andig avatar Mar 23 '20 07:03 andig

I think a common use case is that the script is executed as a cron-job. In my case on a Raspberry. Cron sends the output of the process by mail. So I get a daily mail, even if everything was fine.

To prevent this, I start the script with >/dev/null 2>&1

But this also means that I do not get a mail in case of an error.

It would be helpful if there was a quiet option that only outputs when an error occurs.

Wonko52 avatar Mar 23 '20 08:03 Wonko52