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

Remko Popma commented on LOG4J2-1181:
-------------------------------------

Copying the string interpolation example here to make discussion easier: (Note: 
it may be good to expand the documentation to show the interface of the 
{{user}} object's type.)

{code}
logger.debug(s"Logging in user ${user.getName} with birthday 
${user.calcBirthday}")
{code}


>From a usability point of view, I like this even better than the Log4j 
>parameterized message syntax: in the Scala example it is not possible to 
>mistakenly have more parameter placeholders than values, they are always in 
>sync. It would be interesting to see some performance numbers, but I imagine 
>that the Scala language does String interpolation efficiently.

> Scala wrapper for Log4j 2 API
> -----------------------------
>
>                 Key: LOG4J2-1181
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1181
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: API
>    Affects Versions: 2.4.1, 2.5, 2.6, 2.6.1
>            Reporter: Mikael Ståldal
>
> Scala wrapper for Log4j 2 API which makes use of Scala features like macros 
> and string interpolation.
> Inspired from [Typesafe's Scala 
> Logging|https://github.com/typesafehub/scala-logging] but should use Log4j 2 
> directly and expose its features.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to