Skip to content

Commit 6ad4463

Browse files
committed
Make LoggerConfig and LoggingConfig frozen and keyword-only
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 0100d62 commit 6ad4463

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

RELEASE_NOTES.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,14 @@
1717

1818
+ The `load()` method was removed. Please use `frequenz.sdk.config.load_config()` instead.
1919
+ The class is now a standard `dataclass` instead of a `marshmallow_dataclass`.
20+
+ The class is now immutable.
21+
+ The constructor now accepts only keyword arguments.
2022

21-
* `LoggerConfig` is now a standard `dataclass` instead of a `marshmallow_dataclass`.
23+
* `LoggerConfig`
24+
25+
+ The class is now a standard `dataclass` instead of a `marshmallow_dataclass`.
26+
+ The class is now immutable.
27+
+ The constructor now accepts only keyword arguments.
2228

2329
## New Features
2430

src/frequenz/sdk/config/_logging_actor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"""A marshmallow field for validating log levels."""
2727

2828

29-
@dataclass
29+
@dataclass(frozen=True, kw_only=True)
3030
class LoggerConfig:
3131
"""A configuration for a logger."""
3232

@@ -41,7 +41,7 @@ class LoggerConfig:
4141
"""The log level for the logger."""
4242

4343

44-
@dataclass
44+
@dataclass(frozen=True, kw_only=True)
4545
class LoggingConfig:
4646
"""A configuration for the logging system."""
4747

0 commit comments

Comments
 (0)