aetherscale

[unmaintained] code for a cloud provider tutorial
Log | Files | Refs | README | LICENSE

commit 7e2ff44299c58a5b8131297f46df0429761a068d
parent fe3431155642dbd3d34851ac348e3de1e011cb57
Author: Stefan Koch <programming@stefan-koch.name>
Date:   Thu, 10 Dec 2020 15:52:16 +0100

allow to define log level

Diffstat:
Maetherscale/computing.py | 4+++-
Maetherscale/config.py | 5+++--
2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/aetherscale/computing.py b/aetherscale/computing.py @@ -17,7 +17,7 @@ from typing import List, Optional, Dict, Any, Callable from . import interfaces from . import execution from . import qemu -from .config import RABBITMQ_HOST +from .config import LOG_LEVEL, RABBITMQ_HOST VDE_FOLDER = '/tmp/vde.ctl' @@ -33,6 +33,8 @@ QUEUE_COMMANDS_MAP = { COMPETING_QUEUE: ['create-vm'], } +logging.basicConfig(level=LOG_LEVEL) + class QemuException(Exception): pass diff --git a/aetherscale/config.py b/aetherscale/config.py @@ -1,4 +1,6 @@ +import logging import os +LOG_LEVEL = os.getenv('LOG_LEVEL', default=logging.WARNING) -RABBITMQ_HOST = os.getenv('RABBITMQ_HOST', default='localhost')- \ No newline at end of file +RABBITMQ_HOST = os.getenv('RABBITMQ_HOST', default='localhost')