Match new log helper
This commit is contained in:
parent
af3abd6108
commit
db01059fcf
2 changed files with 2 additions and 4 deletions
|
@ -10,7 +10,6 @@ from jarvis_tasks.config import TaskConfig
|
||||||
from jarvis_tasks.tasks import ban, reminder, twitter, warning
|
from jarvis_tasks.tasks import ban, reminder, twitter, warning
|
||||||
|
|
||||||
logger = None
|
logger = None
|
||||||
debug = False
|
|
||||||
|
|
||||||
|
|
||||||
async def _start(config: Optional[str] = "config.yaml") -> None:
|
async def _start(config: Optional[str] = "config.yaml") -> None:
|
||||||
|
@ -60,8 +59,7 @@ def start(config: Optional[str] = "config.yaml") -> None:
|
||||||
global logger, debug
|
global logger, debug
|
||||||
# Set log level
|
# Set log level
|
||||||
_config = TaskConfig.from_yaml(config)
|
_config = TaskConfig.from_yaml(config)
|
||||||
debug = _config.log_level == "DEBUG"
|
logger = get_logger(__name__)
|
||||||
logger = get_logger(__name__, debug=debug)
|
|
||||||
logger.setLevel(_config.log_level)
|
logger.setLevel(_config.log_level)
|
||||||
|
|
||||||
# Run the main tasks
|
# Run the main tasks
|
||||||
|
|
2
poetry.lock
generated
2
poetry.lock
generated
|
@ -218,7 +218,7 @@ umongo = "^3.1.0"
|
||||||
type = "git"
|
type = "git"
|
||||||
url = "https://git.zevaryx.com/stark-industries/jarvis/jarvis-core.git"
|
url = "https://git.zevaryx.com/stark-industries/jarvis/jarvis-core.git"
|
||||||
reference = "main"
|
reference = "main"
|
||||||
resolved_reference = "f57d79c01a1781bf299b7ea504db60767a808545"
|
resolved_reference = "5ecab61fdb03c99485552ded7618530e81ca19fb"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "jedi"
|
name = "jedi"
|
||||||
|
|
Loading…
Add table
Reference in a new issue