[
https://issues.apache.org/jira/browse/LOG4J2-797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146029#comment-14146029
]
whaefelinger commented on LOG4J2-797:
-------------------------------------
{quote}
Too much detail? Perhaps only add this to the Gradle section instead of at the
top of the page?
{quote}
This explanation affects just all build tools, not only the Gradle one. As you
can see
[here|http://maven.apache.org/plugins/maven-dependency-plugin/list-mojo.html],
Maven includes also a "runtime" scope. Thus it affects all build engines and
should thus be a top node.
My personal taste is "the more information the better". However, the last
paragraph is perhaps too much implementation specific. Thus:
{quote}
Log4j2 is broken up in an API and an implementation (core), where the API
provides the interface that applications should code to. Strictly speaking
Log4j2 core is only needed at runtime and not at compile time.
However, below we list Log4j2 core as compile time dependency to improve the
startup time for [custom
plugins|http://logging.apache.org/log4j/2.x/manual/plugins.html].
{quote}
Note: I changed Log4j into Log4j2.
That said, why did I open this ticket? Cause a "natural" consequence of
splitting into api/core is to have the latter added as runtime (i.e. exchange
the core with another log engine supporting the same api). Obviously, this is
currently not possible.
So what is technically missing in your explanation are the consequences of
listing log4j2 as runtime dependency. Will it (a) not compile, will it (b)
result in a slow startup, will it (c) have no effect in the absence of custom
plugins?
By reading the explanation above, I conclude that (c) must be the consequence.
Not sure whether this is really the case.
> log4j-core should be listed as runtime dependency
> -------------------------------------------------
>
> Key: LOG4J2-797
> URL: https://issues.apache.org/jira/browse/LOG4J2-797
> Project: Log4j 2
> Issue Type: Improvement
> Components: Documentation
> Affects Versions: 2.0.2
> Environment: http://logging.apache.org/log4j/2.x/maven-artifacts.html
> Reporter: whaefelinger
> Assignee: Remko Popma
> Priority: Minor
> Fix For: 2.1
>
>
> The documentation (website:
> http://logging.apache.org/log4j/2.x/maven-artifacts.html) lists "log4j-core"
> as compile dependency (Gradle).
> While this at not wrong, it does not hit the idea of api/core separation.
> Thus I suggest to list "log4j-core" as runtime dependency, i.e.
> {code}
> dependencies {
> compile group: 'org.apache.logging.log4j', name: 'log4j-api', version:
> '2.0.2'
> runtime group: 'org.apache.logging.log4j', name: 'log4j-core', version:
> '2.0.2'
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]