New swift-log testing LogHandler

It is designed to capture and format log messages for use in assertions and is available here.


The Readme doesn't really say or show what it does. Could you elaborate, or enhance the Readme with sample usage maybe?

Always great to have new LogHandlers! Thx!

Very nice work @neallester! :-)

I use such approach as well often when the logs are expected to be the "UI" that others look at -- i.e. a library and I want to ensure good logs :+1: Nice to see a LogHandler in OSS implementing this pattern nicely.

Would you want to PR to apple/swift-log and include it in the list of suggested handler impls? (Something like that: with an one-liner about what the lib does).

@tkrajacic there's examples linked to from the main README, I think that's good enough :slight_smile: Short story being: allowing to capture logs and assert if they were the ones you'd have expected etc.

edit: I made a ticket as a reminder so we don't forget about it :slight_smile:


Sample code showing usage is available here:


1 Like
Terms of Service

Privacy Policy

Cookie Policy