Could we use the text substitution and check if log level is enabled if there's auto-boxing:

```java
if (logger.isDebugEnabled()) {
    logger.debug("Removed {} from map[{}]", removed.sessionId, sessions.size());
}
```

You'll have to check every log statements unfortunately.