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

Florian Schmaus commented on LOG4J2-3524:
-----------------------------------------

bq. PMC is considering how to proceed with log4j-scala. Are you using it? What 
is your use case? Where does log4j-scala shine for you compared to using 
log4j-api directly?

The case for a Scala API for LOG4J is that Scala Macros allow to efficiently 
elide log sites that are not active/enabled. This is not possible when using 
log4j's Java API directly. This Macro magic is done in scala-logging and in the 
code in log4j-scala (which is heavily inspired by scala-logging).

If I where to use scala-logging, as suggested, then I had to add 
log4j-sfl4j-impl to my project. And I like to avoid dependencies whenever 
possible. :)

I currently use the exact code of my PR in a Scala 3.3 project. It's just 2 
Scala files.

> support scala 3.0
> -----------------
>
>                 Key: LOG4J2-3524
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3524
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Scala API
>    Affects Versions: Scala 12.1
>            Reporter: PJ Fanning
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> This commit - 
> [https://github.com/apache/logging-log4j-scala/commit/63584bb16ec735fb162abf22db977b2832418e62]
>  - will mean that log4j-scala will only support Scala 3.1.x and not Scala 
> 3.0.x.
> See [https://www.scala-lang.org/blog/2022/02/01/scala-3.1.1-released.html]
> ```
> Scala 3 has excellent backward compatibility guarantees between the minor 
> versions. Right now, that means that code compiled with Scala 3.1 can depend 
> on libraries published with 3.0 without any problems. The opposite, hovewer, 
> is not true. Code compiled with 3.0 is not able to read dependencies compiled 
> with 3.1. After the recent release of Scala 3.1.0, we can see that libraries 
> should be really cautious with updating the compiler version, as it forces a 
> bump on every user of that library.
> ```
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to