Skip to content

Commit ee29b71

Browse files
committed
Update demo screenshot
1 parent 8002370 commit ee29b71

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/_static/console_renderer.png

97.9 KB
Loading

show_off.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class SomeClass:
2525
log.warning("uh-uh!")
2626
log.error("omg", a_dict={"a": 42, "b": "foo"})
2727
log.critical("wtf", what=SomeClass(x=1, y="z"))
28-
structlog.dev.ConsoleRenderer.get_active().colors = False
28+
29+
# Demonstrate writable properties
30+
cr = structlog.dev.ConsoleRenderer.get_active()
31+
cr.colors = False
2932
log.info("where are the colors!?", colors="gone")
30-
structlog.dev.ConsoleRenderer.get_active().colors = True
33+
cr.colors = True
3134
log.info("there they are!", colors="back")
3235

3336

0 commit comments

Comments
 (0)