Extensions: capture logs in tests