jvz commented on a change in pull request #7: LOG4J-2518 LOG4J2-2433 Coroutines 
Support
URL: https://github.com/apache/logging-log4j-kotlin/pull/7#discussion_r239870832
 
 

 ##########
 File path: 
log4j-api-kotlin/src/main/kotlin/org/apache/logging/log4j/kotlin/KotlinLogger.kt
 ##########
 @@ -117,19 +117,19 @@ class KotlinLogger(val delegate: ExtendedLogger) {
     delegate.logIfEnabled(FQCN, level, null, msg, t)
   }
 
-  fun log(level: Level, supplier: () -> Any?) {
+  inline fun log(level: Level, supplier: () -> Any?) {
 
 Review comment:
   I mean in the caller location pattern. If you have a pattern layout with 
`%C`, for example, you can get the name of the caller class with line numbers 
and things like that. That feature relies upon knowing which stack frames can 
be safely skipped to find the caller of the logger. By inlining things, you're 
changing the stack, so you should verify that caller info/method info still 
work.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to