Mercurial > libervia-desktop-kivy
comparison libervia/desktop_kivy/core/cagou_main.py @ 497:232a723aae45
core: set log level according to configuration
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 02 Oct 2023 17:20:13 +0200 |
parents | b3cedbee561d |
children | 3b627382e681 |
comparison
equal
deleted
inserted
replaced
496:956f5db30223 | 497:232a723aae45 |
---|---|
423 check_options=quick_utils.check_options, | 423 check_options=quick_utils.check_options, |
424 connect_bridge=False) | 424 connect_bridge=False) |
425 self._import_kv() | 425 self._import_kv() |
426 self.app = LiberviaDesktopKivyApp() | 426 self.app = LiberviaDesktopKivyApp() |
427 self.app.host = self | 427 self.app.host = self |
428 log_level = config.config_get( | |
429 main_config, | |
430 C.CONFIG_SECTION, | |
431 "log_level", | |
432 "INFO" | |
433 ).strip().upper() | |
434 root_logger = logging.getLogger() | |
435 root_logger.setLevel(log_level) | |
428 self.media_dir = self.app.media_dir = config.config_get(main_config, '', | 436 self.media_dir = self.app.media_dir = config.config_get(main_config, '', |
429 'media_dir') | 437 'media_dir') |
430 self.downloads_dir = self.app.downloads_dir = config.config_get(main_config, '', | 438 self.downloads_dir = self.app.downloads_dir = config.config_get(main_config, '', |
431 'downloads_dir') | 439 'downloads_dir') |
432 if not os.path.exists(self.downloads_dir): | 440 if not os.path.exists(self.downloads_dir): |