Improve structured logging tests.