From b76f5782da868ffd1e8b3cca75bb91d997284827 Mon Sep 17 00:00:00 2001 From: Bibo Hao Date: Mon, 1 Jul 2024 23:17:28 +0800 Subject: [PATCH] compact debug log into single line replace pformat/pprint with json.dumps --- dockerspawner/dockerspawner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dockerspawner/dockerspawner.py b/dockerspawner/dockerspawner.py index ea37769..6c227a1 100644 --- a/dockerspawner/dockerspawner.py +++ b/dockerspawner/dockerspawner.py @@ -3,13 +3,13 @@ """ import asyncio import inspect +import json import os import string import warnings from concurrent.futures import ThreadPoolExecutor from functools import partial from io import BytesIO -from pprint import pformat from tarfile import TarFile, TarInfo from textwrap import dedent, indent from urllib.parse import urlparse @@ -1010,7 +1010,7 @@ async def poll(self): container_state = container["State"] self.log.debug( - "Container %s status: %s", self.container_id[:7], pformat(container_state) + "Container %s status: %s", self.container_id[:7], json.dumps(container_state, ensure_ascii=False) ) if container_state["Running"]: