mirror of
https://github.com/matrix-org/pantalaimon.git
synced 2026-01-08 03:25:42 -05: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
1 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue