Open mmmvvvppp opened 1 year ago
This is complicated, since we don't actually use a Python logger, but a Java logger which our Python logger acts as a wrapper for:
Having the Java logger call the Python logger on the solve thread will probably massively decrease performance, due to FFI calls being so costly and Python having an interpreter lock. Since solving mostly happen in Java (since constraints are translated to Java with jpyinterpreter
), having the Java logger call the Python logger in a separate thread should not be as costly, but I would need to write a custom appender for logback/slf4j.
Is there any way to make OptaPy log with a JSON format? It seems the handler in the optaplanner_python_logger is disabled, otherwise I'd be trying to provide a custom handler, e.g. https://pypi.org/project/python-json-logger/