Iproved logging for startup flags.

This commit is contained in:
Storm Dragon
2026-05-29 20:22:06 -04:00
parent f1a8e6af21
commit 3897b63068
3 changed files with 42 additions and 1 deletions
@@ -6,6 +6,7 @@
import inspect
import os
from argparse import Namespace
from configparser import ConfigParser
from fenrirscreenreader.core import applicationManager
@@ -67,6 +68,15 @@ class SettingsManager:
def shutdown(self):
pass
def format_cli_args(self, cliArgs):
if cliArgs is None:
return "{}"
if isinstance(cliArgs, Namespace):
args = vars(cliArgs)
else:
args = vars(cliArgs) if hasattr(cliArgs, "__dict__") else {}
return str({key: args[key] for key in sorted(args)})
def get_binding_backup(self):
return self.bindingsBackup.copy()
@@ -644,6 +654,11 @@ class SettingsManager:
)
)
environment["runtime"]["DebugManager"].initialize(environment)
environment["runtime"]["DebugManager"].write_debug_out(
"Fenrir startup CLI arguments: " + self.format_cli_args(cliArgs),
debug.DebugLevel.INFO,
on_any_level=True,
)
if cliArgs.force_all_screens:
environment["runtime"]["force_all_screens"] = True
+1 -1
View File
@@ -5,4 +5,4 @@
# By Chrys, Storm Dragon, and contributors.
version = "2026.05.29"
code_name = "master"
code_name = "testing"