Skip to content

Commit

Permalink
check that logfile for logger doesn't match manager's own logfile; #212
Browse files Browse the repository at this point in the history
  • Loading branch information
vreuter committed Feb 18, 2024
1 parent a83025b commit ba423a4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pypiper/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ def __init__(

# Set up logger
logger_kwargs = logger_kwargs or {}
if logger_kwargs.get("logfile") == self.pipeline_log_file:
raise ValueError(
f"The logfile given for the pipeline manager's logger matches that which will be used by the manager itself: {self.pipeline_log_file}"
)
default_logname = ".".join([__name__, self.__class__.__name__, self.name])
self._logger = None
if args:
Expand Down

0 comments on commit ba423a4

Please sign in to comment.