MCPcopy Create free account
hub / github.com/aigc3d/LHM / __init__

Method __init__

engine/BiRefNet/utils.py:45–54  ·  view source on GitHub ↗
(self, path="log.txt")

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected