From 6fb245f6901f3b4796f634c452315acbcdc6e623 Mon Sep 17 00:00:00 2001 From: disqualifier Date: Fri, 3 Jul 2026 16:23:22 -0400 Subject: [PATCH] docs: fix console=True stream claim, stdout -> stderr (StreamHandler default) Signed-off-by: disqualifier --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e0f2aff..0aaa001 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ from log_setup import setup_logging setup_logging(name="run", level="INFO") # daily rotation, logs/ dir, gzip (file only) log = logging.getLogger(__name__) -log.info("started") # -> ./run.log (add console=True for stdout too) +log.info("started") # -> ./run.log (add console=True for stderr too) ``` Call it once, at the app's entry point — before the rest of the app runs. Every module @@ -57,7 +57,7 @@ emits; the records land in the configured root. - **Retention** = `backup_count` (default 14) for every mode — unless tiered retention is enabled (below). For `rotate="size"`, `backup_count=0` is "keep none" (not "disable rotation") — see the `size` bullet above and the note at the bottom of this section. -- **console=True** (off by default) also logs to stdout in the same format — opt in when +- **console=True** (off by default) also logs to stderr in the same format — opt in when you want live terminal output alongside the file. The `name` you pass is normalized so it produces exactly one `.log`: `name="latest"` and @@ -174,7 +174,7 @@ setup_logging( keep_compressed=None, # tiered: next M rolled logs kept GZIPPED (opt-in) max_bytes=10_000_000, # only for rotate="size" compress=True, # gzip rolled files - console=False, # also log to stdout (off by default; opt in) + console=False, # also log to stderr (off by default; opt in) queue=False, # route through a background QueueListener (async-friendly) output="text", # "text" (human, local time) | "json" (structured, UTC) fmt=None, # override the text format string (text mode only)