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

Workaround for bug in Android logging system

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.7.13
    • slf4j-android
    • None

    Description

      Android's logging system is retarded and has two serious bugs, summed up here: https://code.google.com/p/android/issues/detail?id=194974

      In short, Android will NOT log any message nor exception (it will not even log the exception stacktrace, making the exception completely hidden) which contains characters 0..31 in their message. Also, Android will not log stacktrace for any exception which contains \n in the message. I have created a simple workaround which replaces all chars 0..31 with spaces, and this works.

      However, to ultimately fix this, you need to print the stacktrace yourself (to avoid Android's illogical log post-processing) and then remove any chars 0..31 excluding the newlines.
      I will try to fork slf4j-android, tune it up, then I will post more.

      Attachments

        Activity

          People

            slf4j-dev SLF4J developers list
            vyzivus Martin Vysny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: