We should have the option to forward Core logging to an app-provided callback
Opened this issue · 0 comments
marktsuchida commented
MMCore is a library, and libraries that do their own logging are generally problematic. When being used from an environment (Java, Python, other app framework) that has its own logging, the best architecture would be that MMCore plugs into the app's logging strategy.
Something like the ability to specify a callback as the (sole) destination for log messages. (It would also need to be synchronous; any log buffering should be up to the app.)
See: pymmcore-plus/pymmcore-plus#385
Probably not a high priority immediately but a possible feature.
Possible downside: if the app is in Python, this may mean acquiring the GIL on every log entry from devices. May have performance implications.