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

Remko Popma commented on LOG4J2-1650:
-------------------------------------

[~romain.manni-bucau] Until LOG4J2-1627 is addressed, you will need to manually 
reduce the size of the shaded jar by excluding packages and classes you don't 
need. 

Given that you _only_ want Console and File logging, you could exclude:
{noformat}
org.apache.logging.log4j.core.appender.db (incl sub packages)
org.apache.logging.log4j.core.appender.mom (incl sub packages)
org.apache.logging.log4j.core.jackson
{noformat}

With some more work you can also exclude the below:
(which would disable SyslogAppender, SmtpAppender, SocketAppender, JmsAppender, 
GelfLayout, Rfc5424Layout, SyslogLayout, JndiLookup, and JndiContextSelector)
{noformat}
org.apache.logging.log4j.core.jmx // keep Server class (empty impl.)
org.apache.logging.log4j.core.net // keep Advertiser class
org.apache.logging.log4j.core.net.mom.jms
org.apache.logging.log4j.core.net.server
org.apache.logging.log4j.core.net.ssl
{noformat}


> 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
>
> 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to