MCPcopy Create free account
hub / github.com/HKUDS/OpenSpace / FlushFileHandler

Class FlushFileHandler

openspace/utils/logging.py:51–56  ·  view source on GitHub ↗

File handler that flushes after each emit for real-time logging

Source from the content-addressed store, hash-verified

49
50
51class FlushFileHandler(logging.FileHandler):
52 """File handler that flushes after each emit for real-time logging"""
53
54 def emit(self, record):
55 super().emit(record)
56 self.flush() # Immediately flush to disk
57
58
59class ColoredFormatter(logging.Formatter):

Callers 2

configureMethod · 0.85
add_file_handlerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected