zio-logging icon indicating copy to clipboard operation
zio-logging copied to clipboard

provide example on how to test logging messages

Open domdorn opened this issue 2 years ago • 1 comments

The documentation should have a example on how to use the loggers in tests and how to do assertions on log messages.

domdorn avatar Jun 16 '22 21:06 domdorn

Hi @domdorn,

with ZIO 2, logging interface is in zio core library, you can use ZTestLogger

to test log output, please check that, and let us know if this is what your are looking for,

also in addition thank you for your hint, definitely it should be in documentation, we will work on that ...

justcoon avatar Jul 03 '22 11:07 justcoon

Hi @domdorn, please let me know if this solving your problem, thank you very much.

justcoon avatar Oct 03 '22 18:10 justcoon

sadly we've deleted all code that tests log output from our tests, so can't reproduce this now anymore :-/ did any change in documentation happen?

domdorn avatar Oct 03 '22 22:10 domdorn