dx logs
This commit is contained in:
parent
a07b2e0355
commit
6b3dc0c9af
@ -19,7 +19,7 @@ class Application:
|
||||
self._template_renderer = TemplateRenderer(project_dir=project_dir, model_store=self._model_store, render_hook=self.render_hook)
|
||||
self._web_server = WebServer(project_dir=project_dir, model_store=self._model_store, template_renderer=self._template_renderer)
|
||||
|
||||
logging.info("[obscreen] Starting application v{}...".format(self.get_version()))
|
||||
logging.info("[{}] Starting application v{}...".format(self.get_name(), self.get_version()))
|
||||
self._plugin_store = PluginStore(project_dir=project_dir, model_store=self._model_store, template_renderer=self._template_renderer, web_server=self._web_server)
|
||||
signal.signal(signal.SIGINT, self.signal_handler)
|
||||
|
||||
@ -27,7 +27,7 @@ class Application:
|
||||
self._web_server.run()
|
||||
|
||||
def signal_handler(self, signal, frame) -> None:
|
||||
logging.info("Shutting down...")
|
||||
logging.info("[{}] Shutting down...".format(self.get_name()))
|
||||
self._model_store.database().close()
|
||||
self._stop_event.set()
|
||||
sys.exit(0)
|
||||
|
||||
@ -89,7 +89,7 @@ class PluginStore:
|
||||
plugin=plugin
|
||||
)
|
||||
|
||||
logging.info("[plugin:{}] Controller {} loaded".format(
|
||||
logging.debug("[plugin:{}] Controller {} loaded".format(
|
||||
plugin.use_id(),
|
||||
obj.__name__
|
||||
))
|
||||
@ -138,13 +138,13 @@ class PluginStore:
|
||||
|
||||
self._hooks[hook_registration.hook].append(hook_registration)
|
||||
|
||||
logging.info("[plugin:{}] {} variable{} loaded".format(
|
||||
logging.debug("[plugin:{}] {} variable{} loaded".format(
|
||||
plugin.use_id(),
|
||||
len(variables),
|
||||
"s" if len(variables) > 1 else "",
|
||||
))
|
||||
|
||||
logging.info("[plugin:{}] {} hook{} loaded".format(
|
||||
logging.debug("[plugin:{}] {} hook{} loaded".format(
|
||||
plugin.use_id(),
|
||||
len(hooks_registrations),
|
||||
"s" if len(hooks_registrations) > 1 else "",
|
||||
@ -159,7 +159,7 @@ class PluginStore:
|
||||
|
||||
def clean_dead_variables(self) -> None:
|
||||
for variable_name, variable in self._dead_variables_candidates.items():
|
||||
logging.info("Removing dead plugin variable {}".format(variable_name))
|
||||
logging.debug("Removing dead plugin variable {}".format(variable_name))
|
||||
self._model_store.variable().delete(variable.id)
|
||||
|
||||
def is_plugin_enabled(self, plugin: ObPlugin) -> bool:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user