Skip to content

Commit

Permalink
Merge pull request #228 from PowerGridModel/fix/log-level-instance-id
Browse files Browse the repository at this point in the history
Fix the instance id issue when having multiple converter objects of same class
  • Loading branch information
Jerry-Jinfeng-Guo authored Feb 19, 2024
2 parents a7666e5 + 17be21d commit e26de5c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/power_grid_model_io/converters/base_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def __init__(
"""
Initialize a logger
"""
self._logger = logging.getLogger(type(self).__name__)
self._logger = logging.getLogger(f"{__name__}_{id(self)}")
self._logger.setLevel(log_level)
self._log = structlog.wrap_logger(self._logger, wrapper_class=structlog.make_filtering_bound_logger(log_level))
self._source = source
Expand Down

0 comments on commit e26de5c

Please sign in to comment.