Check loggability before constructing logged string

These allocations are small but they accumulate on vsyncs.
In some long allocation profiles I've seen, these amounted to almost 1%
of Java heap allocations.

Bug: 184951839
Test: N/A these logs aren't tested
Flag: EXEMPT refactor
Change-Id: I2201c1faf37e1a8b186a646af50694ea0c813962
1 file changed