From 87bfcf4bf7c9ab32448d246e4416ea8638fe8f07 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Fri, 19 Jan 2024 16:58:41 -0600 Subject: [PATCH] Add --log-format --- wyoming_satellite/__main__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/wyoming_satellite/__main__.py b/wyoming_satellite/__main__.py index d9edef8..796c5a6 100644 --- a/wyoming_satellite/__main__.py +++ b/wyoming_satellite/__main__.py @@ -235,6 +235,9 @@ async def main() -> None: "--debug-recording-dir", help="Directory to store audio for debugging" ) parser.add_argument("--debug", action="store_true", help="Log DEBUG messages") + parser.add_argument( + "--log-format", default=logging.BASIC_FORMAT, help="Format for log messages" + ) args = parser.parse_args() # Validate args @@ -267,7 +270,9 @@ async def main() -> None: if args.vad and (args.wake_uri or args.wake_command): _LOGGER.warning("VAD is not used with local wake word detection") - logging.basicConfig(level=logging.DEBUG if args.debug else logging.INFO) + logging.basicConfig( + level=logging.DEBUG if args.debug else logging.INFO, format=args.log_format + ) _LOGGER.debug(args) if args.debug_recording_dir: