Skip to content

Commit e7c9523

Browse files
Set httpx and httpcore logger level to WARNING (#176)
`httpx` and `httpcore` (used by `lightkube`) have noisy INFO & DEBUG level logs Supersedes #145. It still seems a bit backwards to me to enable DEBUG level logs for all python dependencies and then manually disable logging for dependencies of our dependencies. Personally, I only think DEBUG level logs are useful for charm ecosystem code (e.g. ops, the charm, charm libs)—but it seems like the consensus [from this discussion](#145 (comment)) is different
1 parent efd153d commit e7c9523

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/kubernetes_charm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
import upgrade
2626

2727
logger = logging.getLogger(__name__)
28+
logging.getLogger("httpx").setLevel(logging.WARNING)
29+
logging.getLogger("httpcore").setLevel(logging.WARNING)
2830

2931

3032
class KubernetesRouterCharm(abstract_charm.MySQLRouterCharm):

0 commit comments

Comments
 (0)