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

bugzilla-daemon at pixie.qos.ch bugzilla-daemon at pixie.qos.ch
Fri Mar 12 13:55:39 CET 2010


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

           Summary: slf4j android: Android throws an
                    IllegalArgumentException when Log Tag length exceeds 23
                    characters
           Product: SLF4J
           Version: 1.5.x
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: Implementations
        AssignedTo: slf4j-dev at qos.ch
        ReportedBy: lorecarra at gmail.com


I don't know if the 23-characters long tag limitation has been removed in later
releases, but, unfortunately, Android 1.1 has it. I think the tag length should
be checked and the tag eventually trimmed in order to avoid incurring in this
exception without having to change the application logging code.
The check is performed into the native method android.util.Log.isLoggable()
To reproduce the problem in Android 1.1:

String ALLOWED_TAG = "abcdefghijklmnopqrstuvw";
String TOO_LONG_TAG = "abcdefghijklmnopqrstuvwxyz";
Log.i(ALLOWED_TAG, "blabla");
Log.i(TOO_LONG_TAG, "blabla");


-- 
Configure bugmail: http://bugzilla.slf4j.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the slf4j-dev mailing list