(self, fpath=None)
| 131 | Code imported from https://github.com/Cysu/open-reid/blob/master/reid/utils/logging.py. |
| 132 | """ |
| 133 | def __init__(self, fpath=None): |
| 134 | self.console = sys.stdout |
| 135 | self.file = None |
| 136 | if fpath is not None: |
| 137 | mkdir_if_missing(osp.dirname(fpath)) |
| 138 | self.file = open(fpath, 'w') |
| 139 | |
| 140 | def __del__(self): |
| 141 | self.close() |
nothing calls this directly
no test coverage detected