Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Quietly collect debug logs. #109

Merged

Conversation

jdeanwallace
Copy link
Contributor

Don't print any status/info messages to stdout when running the collect-debug-logs script in -q silent mode.

Design Decisions

  1. Added a helper function, print_info, that prints to stdout only when collect-debug-logs is in silent mode.
  2. The helper function wraps printf and not echo in order to have more flexibility when wanting to print special characters (i.e newlines). The caveats include:
    1. You always need to add a newline to the end of each status/info message.
    2. Watchout when printing --, which has a special meaning for printf (i.e ignore everything after --).

Demo video.

Reverts #100 and Fixes #106

@mtlynch
Copy link
Contributor

mtlynch commented Mar 8, 2021

LGTM, thanks!

@mtlynch mtlynch merged commit 93c73d4 into tiny-pilot:master Mar 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make collect-debug-logs -q quieter
2 participants