MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / json_logger

Class json_logger

src/ifcopenshell-python/ifcopenshell/validate.py:91–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89
90
91class json_logger:
92 def __init__(self):
93 self.statements = []
94 self.state = {}
95
96 def set_state(self, key: str, value: Any):
97 self.state[key] = value
98
99 def log(self, level, message, *args):
100 self.statements.append({"level": level, "message": message % args, **self.state})
101
102 def __getattr__(self, level):
103 return functools.partial(self.log, level)
104
105
106simple_type_python_mapping = {

Callers 2

rule_executor.pyFile · 0.90
validate.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected