Skip to content

Commit 8fd4c0f

Browse files
authored
Make Project.logCategory appends project.name to project.path with a delimiter (#1215)
1 parent 2602d7d commit 8fd4c0f

File tree

1 file changed

+1
-1
lines changed
  • src/main/kotlin/org/jetbrains/intellij

1 file changed

+1
-1
lines changed

src/main/kotlin/org/jetbrains/intellij/utils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ private fun log(level: LogLevel, logCategory: String?, message: String, e: Throw
283283
}
284284
}
285285

286-
fun Project.logCategory(): String = path + name.takeIf { ":$it" != path }.orEmpty()
286+
fun Project.logCategory(): String = path + if (path.endsWith(name)) " $name" else ""
287287

288288
fun Task.logCategory(): String = project.logCategory() + path.removePrefix(project.logCategory())
289289

0 commit comments

Comments
 (0)