Skip to content

Commit 567c4c1

Browse files
committed
docs
1 parent 9ac5612 commit 567c4c1

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

docs/console-output.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,23 @@ Roughly speaking, there are two ways to configure console output.
5050
1. Using our defaults and tweak some settings.
5151
2. Explicit columns configuration.
5252

53-
You have to pick one and not mix the two.
54-
For example, if you pass *columns* to {class}`~structlog.dev.ConsoleRenderer`, all other output-related parameters are ignored, but if you set one of the properties, the columns will be reconfigured accordingly and your columns settings will be lost.
53+
You should pick one and not mix the two.
54+
For example, if you pass *columns* to {class}`~structlog.dev.ConsoleRenderer`, all other output-related parameters are stored but otherwise ignored.
55+
But if you set one of the non-*columns* properties, the columns will be reconfigured accordingly and *your* columns settings will be lost.
5556
:::
5657

5758

58-
5959
### Defaults plus tweaking
6060

6161
The easier way where you're mostly using our defaults and just tweak a few things here and there by passing arguments or setting properties (as of 25.5.0).
6262

63-
For example, you can easily change the colors of the the log levels by passing the *level_styles* parameter or switch *colors* on and off completely.
63+
For example, you can easily change the colors of the the log levels by passing the *level_styles*[^styles] parameter or switch *colors* on and off completely.
6464

65-
When the API talks about "styles", it means ANSI control strings.
65+
[^styles]: When the API talks about "styles", it means ANSI control strings.
6666
You can find them, for example, in [Colorama](https://github.com/tartley/colorama).
6767

68+
You can find the relevant arguments and properties in the {class}`~structlog.dev.ConsoleRenderer` documentation.
69+
6870

6971
### Explicit columns configuration
7072

src/structlog/dev.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ def sort_keys(self, value: bool) -> None:
913913
"""
914914
.. versionadded:: 25.5.0
915915
"""
916+
# _sort_keys is a format-time setting, so we can just set it directly.
916917
self._sort_keys = value
917918

918919
@property

0 commit comments

Comments
 (0)