Recently, I came across a scenario where I had to log a list of entries whenever that list was not empty. Basically, I was removing invalid data that I have received from outside and I wanted to warn about this in a case users would complain they are missing these entries.
Anyway, I had to do an equivalent of this several times in a row:
if (anyCondition) {
logger.warn("Hey, something is not okay!");
}