undo logger none removal

This commit is contained in:
Louis Abel 2023-12-23 15:06:20 -07:00
parent 8481efd03c
commit 62d8d6a233
Signed by untrusted user: label
GPG Key ID: B37E62D143879B36

View File

@ -1806,16 +1806,17 @@ class SigRepoSync:
)
# This is temporary for now.
self.log = logging.getLogger("sigreposync")
self.log.setLevel(getattr(logging, logger.upper(), 'INFO'))
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
formatter = logging.Formatter(
'%(asctime)s :: %(name)s :: %(message)s',
'%Y-%m-%d %H:%M:%S'
)
handler.setFormatter(formatter)
self.log.addHandler(handler)
if logger is None:
self.log = logging.getLogger("sigreposync")
self.log.setLevel(getattr(logging, logger.upper(), 'INFO'))
handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)
formatter = logging.Formatter(
'%(asctime)s :: %(name)s :: %(message)s',
'%Y-%m-%d %H:%M:%S'
)
handler.setFormatter(formatter)
self.log.addHandler(handler)
self.log.info('sig reposync init')
self.log.info(self.profile + ' ' + self.major_version)