mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2025-03-11 08:49:30 -04:00
daemon: Set the log level for our logger when we set it on the cli.
This commit is contained in:
parent
1378dca195
commit
4ef329df41
@ -5,7 +5,7 @@ import asyncio
|
||||
import aiohttp
|
||||
import os
|
||||
import json
|
||||
import ssl
|
||||
import logbook
|
||||
|
||||
import click
|
||||
from ipaddress import ip_address
|
||||
@ -460,6 +460,15 @@ def main(
|
||||
|
||||
StderrHandler(level=log_level.upper()).push_application()
|
||||
|
||||
if log_level == "info":
|
||||
logger.level = logbook.INFO
|
||||
elif log_level == "warning":
|
||||
logger.level = logbook.WARNING
|
||||
elif log_level == "error":
|
||||
logger.level = logbook.ERROR
|
||||
elif log_level == "debug":
|
||||
logger.level = logbook.DEBUG
|
||||
|
||||
loop = asyncio.get_event_loop()
|
||||
proxy, app = loop.run_until_complete(init(
|
||||
homeserver.geturl(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user