INNER CODE UNIT · Python
_DropIdleMonitoringLines
pathwaycom/llm-app · serviette/indexer/main.py:107
class _DropIdleMonitoringLines(logging.Filter):
"""Hide the engine's heartbeat lines that report no work.
``pathway_engine.connectors.monitoring`` logs every output flush and
every input poll — about ten lines a minute on an idle index, all saying
"0 entries". The same lines with a non-zero count are the user's only
progress indicator ("source_0: 5 entries … sent to the engine", "Done
writing 5 entries"), so those stay."""
_IDLE = re.compile(r"Done writing 0 entries|: 0 entries \(")
def filter(self, record: logging.LogRecord) -> bool:
return not self._IDLE.search(record.getMessage())
def main(argv: list[str] | None = None) -> None:
parser = argparse.ArgumentParser(prog="serviette indexer")
parser.add_argument("--config", required=True, help="Path to the YAML config file")