forked from M-Labs/artiq
1
0
Fork 0

aqctl_corelog: only set logging.DEBUG after the server is set up

Otherwise asyncio pollutes the log.
This commit is contained in:
Sebastien Bourdeauducq 2017-07-18 14:00:06 +08:00
parent dd87508a7f
commit 9898681a38
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,6 @@ async def get_logs(host):
def main():
args = get_argparser().parse_args()
multiline_log_config(logging.DEBUG)
loop = asyncio.get_event_loop()
try:
@ -64,6 +63,7 @@ def main():
server = Server({"corelog": PingTarget()}, None, True)
loop.run_until_complete(server.start(bind_address_from_args(args), args.port))
try:
multiline_log_config(logging.DEBUG)
loop.run_until_complete(server.wait_terminate())
finally:
loop.run_until_complete(server.stop())