mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 22:48:16 +01:00
Fix log level setting for cli
This commit is contained in:
parent
f13993db31
commit
05b70e3cd7
3 changed files with 5 additions and 4 deletions
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.0.7.a9"
|
||||
__codename__ = "Spring Break"
|
||||
__version__ = "4.0.7.a10"
|
||||
__codename__ = "November Rain"
|
||||
|
||||
|
|
|
@ -239,8 +239,9 @@ def main(context, config_folder_path, logs_folder_path, debug_log_level):
|
|||
if logs_folder_path == "":
|
||||
logs_folder_path = os.path.join(Path(config_folder_path).absolute().parent, 'logs')
|
||||
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(name)s - %(message)s')
|
||||
logging.basicConfig(format=formatter,level=debug_log_level, stream=logging.StreamHandler())
|
||||
logging.basicConfig(format=formatter, stream=logging.StreamHandler())
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(debug_log_level)
|
||||
try:
|
||||
if not os.path.isdir(logs_folder_path):
|
||||
logger.info(f"logs folder '{logs_folder_path}' doesnt exist and we are trying to create it")
|
||||
|
|
|
@ -297,7 +297,7 @@ class CraftBeerPi:
|
|||
await self.kettle.init()
|
||||
await self.call_initializer(self.app)
|
||||
await self.dashboard.init()
|
||||
|
||||
|
||||
|
||||
self._swagger_setup()
|
||||
|
||||
|
|
Loading…
Reference in a new issue