Since we are making modifications on this, I suggest that the assignment to `$logs` be also put on a separate line. `if` conditions are better kept as checks, not actions. I know the code before the patch was like this, but it's good to fix it while we're at it.