api: fix infinite loop in appLog handler

Oh boy...