mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[uast-inspection] IDEA-333003 support fluent api for slf4j
- now `addArgument` is taken into account and complex cases are skipped GitOrigin-RevId: acbdd50da7199f24938f76d3a84d0d17857b261e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
2109003398
commit
46d30a46d9
@@ -544,7 +544,19 @@ class KotlinLoggingPlaceholderCountMatchesArgumentCountInspectionTest {
|
||||
LoggerFactory.getLogger().atError().log("{}", RuntimeException("test"))
|
||||
LoggerFactory.getLogger().atError().log("{} {}", 1, RuntimeException("test"))
|
||||
LoggerFactory.getLogger().atError().log( "<warning descr="More arguments provided (2) than placeholders specified (1)">{}</warning>" , 1, RuntimeException("test"))
|
||||
builder.log("<warning descr="Fewer arguments provided (1) than placeholders specified (2)">{} {}</warning>", 1)
|
||||
logger2.atError().log("<warning descr="Fewer arguments provided (1) than placeholders specified (2)">{} {}</warning>", 1)
|
||||
|
||||
val loggingEventBuilder = logger2.atError()
|
||||
loggingEventBuilder
|
||||
.log("{} {}", 2) //skip, because it can be complex cases
|
||||
|
||||
logger2.atError()
|
||||
.log("<warning descr="Fewer arguments provided (1) than placeholders specified (2)">{} {}</warning>", 2) //warn
|
||||
|
||||
logger2.atError()
|
||||
.addArgument("s")
|
||||
.addKeyValue("1", "1")
|
||||
.log("{} {}", 2)
|
||||
}
|
||||
|
||||
private val logger2 = LoggerFactory.getLogger()
|
||||
|
||||
Reference in New Issue
Block a user