genn-team / genn

GeNN is a GPU-enhanced Neuronal Network simulation environment based on code generation for Nvidia CUDA.
http://genn-team.github.io/
GNU Lesser General Public License v2.1
233 stars 57 forks source link

Redirect log output from C++ to Python #619

Open neworderofjamie opened 6 months ago

neworderofjamie commented 6 months ago

Currently, messages written to GeNN log channels (e.g. our nice new transpiler error messages) go to stdout which is often hidden in Python e.g. in notebooks. On Linux we could just redirect these using e.g. https://pypi.org/project/wurlitzer/ but that doesn't work on Windows. Wrapping plog::IAppender with pybind11 would probably be the most elegant solution