Skip to content

Commit f702d9b

Browse files
committed
Initialize parent class after all attributes were initialized
This is just in case the parent class calls some abstract method that is implemented in the current class, in which case it could try to accesss the attributes that are not initialized yet. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 1334292 commit f702d9b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/frequenz/sdk/config/_logging_actor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,15 @@ def __init__(
154154
in the application (through a previous `basicConfig()` call), then the format
155155
settings specified here will be ignored.
156156
"""
157-
super().__init__(name=name)
158157
self._config_recv = config_recv
159158

160159
# Setup default configuration.
161160
# This ensures logging is configured even if actor fails to start or
162161
# if the configuration cannot be loaded.
163162
self._current_config: LoggingConfig = LoggingConfig()
164163

164+
super().__init__(name=name)
165+
165166
logging.basicConfig(
166167
format=log_format,
167168
datefmt=log_datefmt,

0 commit comments

Comments
 (0)