log icon indicating copy to clipboard operation
log copied to clipboard

Exception and Formatter issues

Open silentnuke-old opened this issue 10 years ago • 1 comments

There are some issues with exception and formatter:

Log.useFormat(true);
Exception e = new Exception("foo");
Log.d(TAG, "Something bad happened %d, error", 123, e);

prints: 'Something bad happened 123, error'

Log.useFormat(true);
Exception e = new Exception("foo");
Log.d(TAG, "Something bad happened %d, error %s", 123, e);

Crash the app with exception: Caused by: java.util.MissingFormatArgumentException:

silentnuke-old avatar Jan 10 '16 21:01 silentnuke-old

maybe you will use in case number 2 below code version? Log.d(TAG, "Something bad happened %d, error %s", 123, e.toString());

seyidkanan avatar Oct 14 '17 08:10 seyidkanan