[ 
https://issues.apache.org/jira/browse/LOG4J2-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16382910#comment-16382910
 ] 

Matt Sicker commented on LOG4J2-1705:
-------------------------------------

Very nice! Some additional feedback so far:
 * At one point, we decided it would be nicer to support logging CharSequence 
explicitly instead of String. This allows for some fun use cases like shared, 
reusable buffers, and other high performance programming patterns. In general, 
just taking an Object (or an Any in this case) and switching on types is one 
approach, though using static dispatch here makes more sense when possible. 
With that in mind, you can remove the foo(String) methods that already have a 
corresponding foo(CharSequence) version.
 * traceEntry still has a vararg thing; I believe this can still use 
interpolated strings?
 * traceExit might make more sense as {{fun <R> traceExit(message: 
CharSequence, result: R?): R?}}
 ** Or is your {{fun <R : Any?>}} thing do the same thing essentially?
 ** Similarly, I'm not so sure about making messages nullable. We've had API 
compatibility issues in the past due to allowing nulls in parameters (see the 
2.6.x API breakage historically). The params to a message can be nullable, but 
the message generally shouldn't be. That may not always be true, but in a new 
API, we can enforce that.
 * In general, most of these parameters should not be nullable (particularly 
markers). If a user goes through the trouble to use a function that takes a 
marker, they shouldn't be passing null; they can just use the other function 
with less parameters!

> Kotlin wrapper for Log4j 2 API
> ------------------------------
>
>                 Key: LOG4J2-1705
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1705
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: API
>            Reporter: Raman Gupta
>            Priority: Major
>
> Similar to LOG4J2-1181 for Scala, provide a Kotlin wrapper for the Log4j 2 
> API that makes use of Kotlin features like delegates and string interpolation.
> If there is interest in this, I'd like to contribute a patch.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to