[slf4j-dev] [Bug 173] 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 16:36:34 CET 2010


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





--- Comment #2 from Lorenzo Carrara <lorecarra at gmail.com>  2010-03-12 16:36:34 ---
(In reply to comment #1)
> Lorenzo,
> 
> since I currently do not have the resources available: would it be possible for
> you to test if this limitation of max 23 chars does exist in newer Android
> versions (1.5, 1.6, 2.0, 2.1) as well. It would be worth knowing this before
> creating a fix.
> 
> Thanks,
> Thorsten
> 

I will surely check as soon as I can. Anyway, before submitting this bug I
checked  the code where the error is thrown in the android source repository
trunk (the Android 2.1 platform code), and it's still there. I quote some code:

In android/system/core/include/cutils/property.h:

#define PROPERTY_KEY_MAX   32

In android/frameworks/base/core/jni/android_util_Log.cpp

...
#define LOG_NAMESPACE "log.tag."
...
if ((strlen(chars)+sizeof(LOG_NAMESPACE)) > PROPERTY_KEY_MAX) {
-> THROW EXCEPTION: Log tag X exceeds limit of (PROPERTY_KEY_MAX -
sizeof(LOG_NAMESPACE) characters

Hope this helps, when I'll reach an emulator I'll check with the other versions
of the platform.
Bye!

Lorenzo


-- 
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