6

For many questions, posters are encouraged to include their "logcat" (run-time debugging information). However, I see many instances where this looks like:

Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 60
                                                                        at android.content.res.TypedArray.getColor(TypedArray.java:401)
                                                                        at android.support.design.widget.TabLayout.<init>(TabLayout.java:348)
                                                                        at android.support.design.widget.TabLayout.<init>(TabLayout.java:290)
...

instead of:

Caused by: java.lang.RuntimeException: Failed to resolve attribute at index 60
    at android.content.res.TypedArray.getColor(TypedArray.java:401)
    at android.support.design.widget.TabLayout.<init>(TabLayout.java:348)
    at android.support.design.widget.TabLayout.<init>(TabLayout.java:290)
...

(above snipped from random question).

The ancillary question, mainly for idle curiosity, is: What is it about pasting logcats that so often makes them massively indented?

The main question is would "correcting" such formatting be sufficient to justify an edit -- assuming the question isn't "obviously poor quality", and fixing-in-passing any "obvious" problems with the rest of the question (but not necessarily hunting them down)? Or would it be better to ignore such posts or as this answer suggests down-vote if editing would be too much effort.

0

1 Answer 1

7

What is it about pasting logcats that so often makes them massively indented?

Well, because that's what happens if you copy-paste from Logcat:

logcat

Would "correcting" such formatting be sufficient to justify an edit?

Sure, I fix such issues every now and then, because it makes the stacktrace more readable (and scrolling horizontally is annoying).

But, as you already mentioned, if you have less than 2k rep, i.e. you have to submit a suggested edit, make sure the post is worth it and fix all its other problems such as typos, grammar, other formatting issues, etc.

1
  • 2
    Thanks. I guessed it was something like that but don't get a chance to play with Android much so hadn't seen a "real" logcat for ages. And +1 for the free-hand circle!
    – TripeHound
    Commented Aug 1, 2017 at 11:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .