[slf4j-dev] [Bug 173] slf4j android: Android throws an IllegalArgumentException when Log Tag length exceeds 23 characters

bugzilla-daemon at qos.ch bugzilla-daemon at qos.ch
Wed Sep 11 07:56:09 CEST 2013


http://bugzilla.slf4j.org/show_bug.cgi?id=173

--- Comment #15 from Thorsten <thorsten.Moeller at unibas.ch> ---
(In reply to comment #13)
> Just FYI.
> I've just checked all android.util.Log methods v(), d(), i(), w() and e() on
> Android 2.2 and 4.1 - neither of it throws an exception even with very long tag.
> (however Eclipse LogCat view doesn't correctly display messages if tag.length +
> time.length > 128 characters).
> 
> The only place where tag is checked for 23 chars length - isLoggable() method.
Correct. AFAIR, this behavior exists already in Android 1.5.

> I've filled issue on Android bug tracker to correct this most likely obsolete
> behavior: https://code.google.com/p/android/issues/detail?id=59186
Great! This should be the direction in which to put forward this issue.

(In reply to comment #14)
> Taking into account my comment above, maybe we should relax the tag length
> limitation from 23 to at least 80?
Don't agree because it makes things more difficult. How would "is...Enabled"
methods be implemented then: delegate to the backing Android "isLoggable"
logger method? No longer possible directly because they would throw IAE if tag
length > 23. Extend the AndroidLogger such that it implements its own logic on
this? Possible, but, first, it makes it more heavyweight, which, recalling the
original design goal of having the most simple adapter between SLF4J and
AndroidLogging, breaks this goal.

I would really love to see the limitation issue being solved at Android side
rather than working around it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/slf4j-dev/attachments/20130911/2b3af6d3/attachment.html>


More information about the slf4j-dev mailing list