MCPcopy Create free account
hub / github.com/ZhengPeng7/BiRefNet / __init__

Method __init__

utils.py:43–52  ·  view source on GitHub ↗
(self, path="log.txt")

Source from the content-addressed store, hash-verified

41
42class Logger():
43 def __init__(self, path="log.txt"):
44 self.logger = logging.getLogger('BiRefNet')
45 self.file_handler = logging.FileHandler(path, "w")
46 self.stdout_handler = logging.StreamHandler()
47 self.stdout_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
48 self.file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(message)s'))
49 self.logger.addHandler(self.file_handler)
50 self.logger.addHandler(self.stdout_handler)
51 self.logger.setLevel(logging.INFO)
52 self.logger.propagate = False
53
54 def info(self, txt):
55 self.logger.info(txt)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected