As of now, logger is there, but unused in most scripts. We need a coherent logging implementation for the long-term.
If logging an error before raising and Exception, pytest cannot see the expected Exception, e.g.DataService._create_eufid and corresponding test. And how to catch logger warnings in tests?
In some cases, maybe warning is a better choice than logging? But let's first see how is the integration done with the FE.
A clear and concise description of todo items.
[x] Implement proper/coherent logging across the server, consistent with Flask error handling, but integrated with vue-router and more generally exception handling in the Vue app.
Basic config added. Logging configured after creating the application object, but app.logger is not accessed before logging is configured, so no default handler is added. This can be refined later when needed, and in particular when integrating the Vue app.
Exceptions are not redundantly logged, in all cases this works, and we can even assert logs with caplog (commented out).
Aims/objectives.
Implement logging across the server.
DataService._create_eufid
and corresponding test. And how to catch logger warnings in tests?A clear and concise description of todo items.
vue-router
and more generally exception handling in the Vue app.