diff --git a/_modules/pyfpga/project.html b/_modules/pyfpga/project.html index 2b18610d..e44b14e0 100644 --- a/_modules/pyfpga/project.html +++ b/_modules/pyfpga/project.html @@ -115,14 +115,15 @@
self.odir = odir
# logging config
self.logger = logging.getLogger(self.__class__.__name__)
- self.logger.setLevel(logging.INFO)
- handler = logging.StreamHandler()
- formatter = logging.Formatter(
- '%(asctime)s - %(levelname)s - %(message)s',
- datefmt='%Y-%m-%d %H:%M:%S'
- )
- handler.setFormatter(formatter)
- self.logger.addHandler(handler)
+ if not self.logger.handlers:
+ self.logger.setLevel(logging.INFO)
+ handler = logging.StreamHandler()
+ formatter = logging.Formatter(
+ '%(asctime)s - %(levelname)s - %(message)s',
+ datefmt='%Y-%m-%d %H:%M:%S'
+ )
+ handler.setFormatter(formatter)
+ self.logger.addHandler(handler)