Iproved logging for startup flags.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
# By Chrys, Storm Dragon, and contributors.
|
||||
|
||||
version = "2026.05.29"
|
||||
code_name = "master"
|
||||
code_name = "testing"
|
||||
|
||||
Reference in New Issue
Block a user