Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ardunn committed Oct 11, 2019
1 parent 63dfaff commit 2851151
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions automatminer/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ def logger(self, new_logger):
logger will be used. If set to False, then no logging will occur.
"""
new_logger = self.get_logger(new_logger)
assert isinstance(
new_logger, logging.Logger
), "The new logger must be an instance of the logger class."
if not isinstance(new_logger, logging.Logger):
TypeError("The new logger must be an instance of the logger class.")

self._logger = new_logger

if hasattr(self, "autofeaturizer"):
for x in ["autofeaturizer", "cleaner", "reducer", "learner"]:
getattr(self, x)._logger = new_logger
Expand Down

0 comments on commit 2851151

Please sign in to comment.