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

Raman Gupta commented on LOG4J2-1705:
-------------------------------------

[~garydgregory] [~jvz] Updated master to include location-aware logging, now 
that I understand how it works. It makes the FunctionalLogger far more verbose 
as Kotlin class delegates can't be used to make the calls to the wrapped 
ExtendedLogger automatically (AFAIK), passing the FQCN to `logIfEnabled`. In 
fact, the whole class should probably be renamed now to `KotlinLogger` as it is 
no longer specific to just adding functional methods on top of the automatic 
delegates. I don't see any other good way to do this though.

Also note: unfortunately, location-aware logging still does not work for the 
traceEnter/traceExit calls, because the underlying methods that take the FQCN 
are not part of the ExtendedLogger interface, and they are protected in 
AbstractLogger, and cannot therefore be called from my wrapper. I'm not sure 
how other wrappers are handling this issue -- doesn't seem like there is a 
clean way short of reflection.

> 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