How do you log an int on Android?
You can use string concatenation:
Log.d(getClass().getName(), "value = " + intVar);
or more flexibly (and similar to c-style printf) you can use Java's String.format()
:
Log.d(getClass().getName(), String.format("value = %d", intVar));
String.valueOf()
is what you need if you want string representations of various objects.
And by the way, I'd recommend using slf4j for Android. This way, you don't have to pass class name as the first parameter every single time.