lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Laban (JIRA)" <>
Subject [jira] [Updated] (SOLR-7887) Upgrade Solr to use log4j2 -- log4j 1 now officially end of life
Date Wed, 01 Jun 2016 20:45:59 GMT


Keith Laban updated SOLR-7887:
    Attachment: SOLR-7887-WIP.patch

I took a stab at upgrading from log4j to log4j2, which includes porting over the work that
[~thelabdude] did over at .. Although I'm running
into some issues. I'll do my best to document where I'm at so far.

*Changes so far:* 

# Removed dependencies for log4j and slf4j-log4j12
# Added log4j2 dependencies: log4j-api, log4j-core, log4j-slf4j-impl (new slf4j bridge)
#  Deleted {{org.apache.solr.logging.log4j.\*}} and added {{org.apache.solr.logging.log4j2.\*}}
from Tim's impl
# Added Tim's Log4j2Watcher Test
# Updated {{RequestLoggingTest}} and {{LoggingHandlerTest}} for log4j2
# Updated {{SolrLogLayout}} for log4j2 (no tests?)
# Updated in example/resources to log4j2.xml
# Update {{bin/solr}} to use new log4j2.xml and system property {{-Dlog4j.configurationFile}}
# This build will compile and run and LogWatcher works in admin UI as expected

*The problems i'm facing are*:

# Bringing in log4j2 dependencies for some reason is causing javac doclint to fail with errors
like "Invalid use of @throws" in random places throughout solr. For the mean time i've changed
lucene/common-build.xml to use {{<property name="javac.doclint.args" value="-Xdoclint:none"/>}}
until I can figure out whats going on
# What finally railroaded me here is that HDFS uses log4j directly and tests which use HDFS
fail during runtime with no class found exceptions. I tried including the log4j2-1.2 api as
a stop-gap but the the nature of how hdfs uses log4j2 does not allow this as a fix.

If someone wants to jump in here and help out that would be great. I think this would be an
big win for the next major release of solr. 

> Upgrade Solr to use log4j2 -- log4j 1 now officially end of life
> ----------------------------------------------------------------
>                 Key: SOLR-7887
>                 URL:
>             Project: Solr
>          Issue Type: Task
>    Affects Versions: 5.2.1
>            Reporter: Shawn Heisey
>         Attachments: SOLR-7887-WIP.patch
> The logging services project has officially announced the EOL of log4j 1:
> In the official binary jetty deployment, we use use log4j 1.2 as our final logging destination,
so the admin UI has a log watcher that actually uses log4j and java.util.logging classes.
 That will need to be extended to add log4j2.  I think that might be the largest pain point
to this upgrade.
> There is some crossover between log4j2 and slf4j.  Figuring out exactly which jars need
to be in the lib/ext directory will take some research.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message