undo logger none removal
This commit is contained in:
parent
8481efd03c
commit
62d8d6a233
@ -1806,16 +1806,17 @@ class SigRepoSync:
|
|||||||
)
|
)
|
||||||
|
|
||||||
# This is temporary for now.
|
# This is temporary for now.
|
||||||
self.log = logging.getLogger("sigreposync")
|
if logger is None:
|
||||||
self.log.setLevel(getattr(logging, logger.upper(), 'INFO'))
|
self.log = logging.getLogger("sigreposync")
|
||||||
handler = logging.StreamHandler(sys.stdout)
|
self.log.setLevel(getattr(logging, logger.upper(), 'INFO'))
|
||||||
handler.setLevel(logging.INFO)
|
handler = logging.StreamHandler(sys.stdout)
|
||||||
formatter = logging.Formatter(
|
handler.setLevel(logging.INFO)
|
||||||
'%(asctime)s :: %(name)s :: %(message)s',
|
formatter = logging.Formatter(
|
||||||
'%Y-%m-%d %H:%M:%S'
|
'%(asctime)s :: %(name)s :: %(message)s',
|
||||||
)
|
'%Y-%m-%d %H:%M:%S'
|
||||||
handler.setFormatter(formatter)
|
)
|
||||||
self.log.addHandler(handler)
|
handler.setFormatter(formatter)
|
||||||
|
self.log.addHandler(handler)
|
||||||
|
|
||||||
self.log.info('sig reposync init')
|
self.log.info('sig reposync init')
|
||||||
self.log.info(self.profile + ' ' + self.major_version)
|
self.log.info(self.profile + ' ' + self.major_version)
|
||||||
|
Loading…
Reference in New Issue
Block a user