Add the --silent option to allow suppressing log output.

This commit is contained in:
Jonathan Bernard 2025-01-11 11:57:16 -06:00
parent 40cb602362
commit 0361d1b869
3 changed files with 5 additions and 1 deletions

View File

@ -67,6 +67,9 @@ when isMainModule:
if args["--debug"]: if args["--debug"]:
consoleLogger.levelThreshold = lvlDebug consoleLogger.levelThreshold = lvlDebug
if args["--silent"]:
consoleLogger.levelThreshold = lvlNone
if args["--echo-args"]: stderr.writeLine($args) if args["--echo-args"]: stderr.writeLine($args)
if args["help"]: if args["help"]:

View File

@ -82,6 +82,8 @@ Options:
--dry-run Currently only supported by the `sync` command: --dry-run Currently only supported by the `sync` command:
only print the changes that would be made, but do only print the changes that would be made, but do
not actually make them. not actually make them.
-s, --silent Suppress all logging and status output.
""" """
const ONLINE_HELP* = """Issue States: const ONLINE_HELP* = """Issue States:

View File

@ -117,7 +117,6 @@ proc sync*(
dryRun = true, dryRun = true,
batchSize = 100): void = batchSize = 100): void =
if not dryRun: echo "NOT DRY RUN"
# We're going to do a uni-directional sync, pushing local issues to the # We're going to do a uni-directional sync, pushing local issues to the
# server. However, we only want to update issues that have changed since # server. However, we only want to update issues that have changed since
# the last sync based on the *last-updated* property. # the last sync based on the *last-updated* property.