Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-164

slf4j android: Android throws an IllegalArgumentException when Log Tag length exceeds 23 characters

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • None
    • 1.5.x
    • slf4j-android
    • None
    • Operating System: other
      Platform: Other

    Description

      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");

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            lorecarra@gmail.com Lorenzo Carrara
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: