MCPcopy Create free account
hub / github.com/SegmentationBLWX/cssegmentation / log

Method log

csseg/modules/utils/logger.py:16–22  ·  view source on GitHub ↗
(self, message, level='INFO', endwithnewline=True)

Source from the content-addressed store, hash-verified

14 self.logfilepath = logfilepath
15 '''log'''
16 def log(self, message, level='INFO', endwithnewline=True):
17 message = f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} {level} {message}'
18 print(message)
19 if not message.endswith('\n') and endwithnewline:
20 message = message + '\n'
21 with open(self.logfilepath, 'a') as fp:
22 fp.write(message)
23 '''debug'''
24 def debug(self, message, endwithnewline=True):
25 self.log(message, 'DEBUG', endwithnewline)

Callers 9

debugMethod · 0.95
infoMethod · 0.95
warningMethod · 0.95
errorMethod · 0.95
contrastivelearningMethod · 0.80
entropyMethod · 0.80
__call__Method · 0.80
initaddedclassifierMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected