Skip to content

Commit 5695ec7

Browse files
committed
change --slog to use nargs
1 parent ae2ef78 commit 5695ec7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

meshtastic/__main__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -852,10 +852,10 @@ def setSimpleConfig(modem_preset):
852852
qr = pyqrcode.create(url)
853853
print(qr.terminal())
854854

855-
if args.slog_out or args.power_stress:
855+
if args.slog or args.power_stress:
856856
# Setup loggers
857857
global meter # pylint: disable=global-variable-not-assigned
858-
LogSet(interface, args.slog_out if args.slog_out != 'default' else None, meter)
858+
LogSet(interface, args.slog if args.slog != 'default' else None, meter)
859859

860860
if args.power_stress:
861861
stress = PowerStress(interface)
@@ -1584,8 +1584,11 @@ def initParser():
15841584
)
15851585

15861586
power_group.add_argument(
1587-
"--slog-out",
1588-
help="A directory to store structured logging to, or 'default' for automatically selected.",
1587+
"--slog",
1588+
help="Store structured-logs (slogs) for this run, optionally you can specifiy a destination directory",
1589+
nargs="?",
1590+
default=None,
1591+
const="default"
15891592
)
15901593

15911594
group.add_argument(

0 commit comments

Comments
 (0)