From 4adbf58c7f54a764213d073810331ef539b11bf6 Mon Sep 17 00:00:00 2001 From: Rahul Dewasi Date: Wed, 2 Dec 2026 15:49:50 +0530 Subject: [PATCH] docs(logger): clarify child Logger without parent uses root log level Since #8842, a child Logger without a level stays NOTSET. Without a parent Logger, NOTSET resolves against the root logger, so the child may use the root log level instead of Powertools' INFO default. Fixes aws-powertools/powertools-lambda-python#8935. Co-Authored-By: Codebuff --- docs/core/logger.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/core/logger.md b/docs/core/logger.md index 27ba3038c57..b9b9e6f6a9b 100644 --- a/docs/core/logger.md +++ b/docs/core/logger.md @@ -966,7 +966,7 @@ For inheritance, Logger uses `child` parameter to ensure we don't compete with i Changes are bidirectional between parents and loggers. That is, appending a key in a child or parent will ensure both have them. This means, having the same `service` name is important when instantiating them. -A child Logger without a `level` follows its parent's log level, including later changes from `setLevel()` and sampling. Pass `level` to give a child its own log level. +A child Logger without a `level` follows its parent's log level, including later changes from `setLevel()` and sampling. When no parent Logger exists, the child stays at `NOTSET` and Python's logging resolves it against the root logger, so it may end up using the root log level instead of Powertools' `INFO` default. Pass `level` to give a child its own log level. === "logging_inheritance_good.py"