Skip to content

Commit 33b4a7c

Browse files
1951FDGhannesa2
authored andcommitted
Use string constants instead of hardcoded strings in LogcatFragment
1 parent 3053891 commit 33b4a7c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

LogcatCoreLib/src/main/java/info/hannes/logcat/LogcatFragment.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ class LogcatFragment : LogBaseFragment() {
2626

2727
process.inputStream.bufferedReader().use {
2828
it.readLines().map { line ->
29-
val newLine = line.replace(" W/", " W: ")
30-
.replace(" E/", " E: ")
31-
.replace(" V/", " V: ")
32-
.replace(" I/", " I: ")
33-
.replace(" D/", " D: ")
29+
val newLine = line.replace(" W/", " $WARNING_LINE")
30+
.replace(" E/", " $ERROR_LINE")
31+
.replace(" V/", " $VERBOSE_LINE")
32+
.replace(" I/", " $INFO_LINE")
33+
.replace(" D/", " $DEBUG_LINE")
3434

3535
if (!logList.contains(newLine))
3636
logList.add(newLine)

0 commit comments

Comments
 (0)