JakeWharton / JakeWharton/timber

Timber.debugTree splite lose word

Open
#339 9 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
10.8k
Forks
994
Avg merge
17h 16m
Merged PRs (30d)
17

Description

```
// Split by line, then ensure each line can fit into Log's maximum length.
for (int i = 0, length = message.length(); i < length; i++) {
int newline = message.indexOf('\n', i);
newline = newline != -1 ? newline : length;
do {
int end = Math.min(newline, i + MAX_LOG_LENGTH);
String part = message.substring(i, end);
if (priority == Log.ASSERT) {
Log.wtf(tag, part);
} else {
Log.println(priority, tag, part);
}
i = end;
} while (i < newline);
}
```

```
// the beginning index, inclusive.
// the ending index, exclusive
// while i == 0
message.substring(0, 4000);
// while i == 1
message.substring(4001, 8001);

// lost 4000
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the Timber.debugTree implementation containing the shown line-splitting loop and inspect how the substring indexes advance between chunks. Verify that consecutive log parts preserve every character, including the boundary characters, and run the relevant existing tests if available to confirm no words are lost.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.