| 1 | shipyard.carrier, the module logger | names the module that reports each event | getLogger(__name__) at the top of the module | its effective level, before any record is built | lines that say root instead of the module that wrote them |
|---|
| 2 | shipyard, the parent logger | lets one setting cover every module in the package | created by the dotted names below it | nothing for its children’s records; only its own handlers run | a level set here that child lines seem to ignore |
|---|
| 3 | httpx, a library’s logger | carries the library’s own events in the same tree | created by the library, configured by you | its own effective level | one request line per call flooding the log at INFO |
|---|
| 4 | level | drops records below a threshold | level on a logger or handler in dictConfig | the record’s level against the logger’s, then each handler’s | INFO lines missing, or DEBUG volume billed in production |
|---|
| 5 | LogRecord | carries the template, values, time, source line and exception | built by the logger for every call that passes its level | nothing; it only carries data to the handlers | messages with values baked in, or an error with no traceback |
|---|
| 6 | root logger and propagation | collects every record at the top of the tree | the root key in dictConfig | each handler’s level on the way up, never an ancestor logger’s level | every line printed twice when two loggers on one path have handlers |
|---|
| 7 | handler | writes each record that reaches it to stdout | attached to the root logger, once, at startup | its own level, then its filters | no output at all, or lines in a file nobody collects |
|---|
| 8 | request ID filter | adds the current request’s ID to every record | on the handler, so library lines get it too | nothing; it copies a context variable onto the record | lines of one request you can’t pick out from forty others |
|---|
| 9 | redaction filter | masks secrets and personal data before the line is written | on the handler, as the last check | field names such as api_key and email, and keys in URLs | carrier keys or customer emails searchable in the log tool |
|---|
| 10 | formatter | turns each record into one JSON line of named fields | on the handler | nothing; it only decides the shape of the text | a regular expression to find a value, or tracebacks split into many entries |
|---|
| 11 | stdout | carries the lines out of the process to the platform | the handler’s stream | nothing; the platform collects whatever arrives | plain print() text mixed in among the JSON lines |
|---|
| · | dictConfig | sets levels, handlers, filters and formatters in one place | configure_logging(), the first thing main() calls | nothing; it runs once at startup | module loggers silenced because disable_existing_loggers stayed true |
|---|
| · | your code | asks for a record with a fixed message and named fields | every module, through its own logger | nothing | f-strings for messages, secrets in lines, one error logged three times |
|---|