Skip to content

Commit 1bc105a

Browse files
committed
Kotlin: adjust log messages and severities in comment extraction
1 parent 5418c95 commit 1bc105a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

java/kotlin-extractor/src/main/kotlin/comments/CommentExtractor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CommentExtractor(private val fileExtractor: KotlinFileExtractor, private v
140140
is IrAnonymousInitializer -> {
141141
val parentClass = element.parentClassOrNull
142142
if (parentClass == null) {
143-
logger.errorElement("Parent of anonymous initializer is not a class", element)
143+
logger.warnElement("Parent of anonymous initializer is not a class", element)
144144
return null
145145
}
146146
// Assign the comment to the class. The content of the `init` blocks might be extracted in multiple constructors.
@@ -153,7 +153,7 @@ class CommentExtractor(private val fileExtractor: KotlinFileExtractor, private v
153153

154154
// todo add others:
155155
else -> {
156-
logger.errorElement("Unhandled element type: ${element::class}", element)
156+
logger.warnElement("Unhandled element type found during comment extraction: ${element::class}", element)
157157
return null
158158
}
159159
}

0 commit comments

Comments
 (0)