Application launch context: Include app group name in logger (#4684)

* Include app group name with app name for logger

* Include app group name in launch finished log message

* Include app group name with launching message

* Use `application.full_name` instead
This commit is contained in:
Roy Nieterau 2023-03-23 10:27:02 +01:00 committed by GitHub
parent a14b645d89
commit 4d53e4f5fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -889,7 +889,8 @@ class ApplicationLaunchContext:
self.modules_manager = ModulesManager()
# Logger
logger_name = "{}-{}".format(self.__class__.__name__, self.app_name)
logger_name = "{}-{}".format(self.__class__.__name__,
self.application.full_name)
self.log = Logger.get_logger(logger_name)
self.executable = executable
@ -1246,7 +1247,7 @@ class ApplicationLaunchContext:
args_len_str = " ({})".format(len(args))
self.log.info(
"Launching \"{}\" with args{}: {}".format(
self.app_name, args_len_str, args
self.application.full_name, args_len_str, args
)
)
self.launch_args = args
@ -1271,7 +1272,9 @@ class ApplicationLaunchContext:
exc_info=True
)
self.log.debug("Launch of {} finished.".format(self.app_name))
self.log.debug("Launch of {} finished.".format(
self.application.full_name
))
return self.process