[
https://issues.apache.org/jira/browse/LOG4J2-1650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16544274#comment-16544274
]
Romain Manni-Bucau commented on LOG4J2-1650:
--------------------------------------------
Dropping the optional dependencies from log4j-core makes the core going back to
1.3M which is back to the state when this issue was open.
Extracting JMX, Net, OSGi, tools, http/syslog appenders features in another jar
saves a bit more but not enough.
So my opinion today is that log4j2 needs a serious work on:
# its modularity (it is very monolith today and other modules generally just
reuses a core abstraction which means there is some inconsistency at the
modularity level)
# its design: log4j2 introduces several layers (builders, plugins, dat etc)
which all take a lot of size for a logging library (we are not doing scala ;))
I guess an option can be to bypass log4j-core and reimplement the log4j-api
extracting the good piece of code (rolling appender and context classloader
selector mainly) without all the extensions and abstractions, builders etc...
This is however a core choice of the project, would be great to see if it can
hit master anytime soon.
> log4j2-core diet
> ----------------
>
> Key: LOG4J2-1650
> URL: https://issues.apache.org/jira/browse/LOG4J2-1650
> Project: Log4j 2
> Issue Type: Improvement
> Reporter: Romain Manni-Bucau
> Priority: Major
>
> Hello,
> log4j2 is ~1.3M. It is a lot to get started with logging and several parts
> are not mandatory to start and rarely needed all together like jackson, db,
> yaml (this one is not that big) etc...Also saw Generate class which is quite
> big but not sure it is needed at runtime and the annotation processor logic
> is never needed at runtime.
> Anyway, by comparison logback and log4j1 are ~500k so hopefully we could only
> pay the same price to get started with log4j2.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)