Tests: more targeted log capture setup

@Ventero pointed out that functions also have a length property