Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

added --silent and --silent-unchanged flag, regarding #47 #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zaanposni
Copy link
Contributor

replacement for #48
regarding #47

this adds a --silent flag that sets the log level above all standard log levels.

also adds a --silent-unchanged flag that sets the log level to the custom level CHANGE (21, one above INFO). Using this flag, the script will only output warning, errors, DNS changes.

@@ -34,10 +35,26 @@ def load_arguments():
parser.add_argument('--configure', action='store_true', help='Interactively configure the account and domain for the DDNS updates.')
parser.add_argument('--update-now', action='store_true', help='Update DNS records right now.')
parser.add_argument('--debug', action='store_true', help='Print detailed debug output.')
parser.add_argument('--silent', action='store_true', help='Do not print any output.')
parser.add_argument('--silent-unchanged', action='store_true', help='Only print DNS changes / warning / errors.')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the discussion in the other issue I would recommend removing this option entirely since it doesn't add much value; it's not really "silent" and just feels like a raised log level.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, request at Issue #47 is:

Running once a day at midnight with local mail results in the same repeated message of "no changes", but with a quiet option the command would only produce output (and hence an email) if a change was made.

That sounds like my --silent-unchanged flag.
Why not offer the option if someone wants it?

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.

2 participants