lucene-dev mailing list archives

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

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

Keith Laban edited comment on SOLR-7887 at 6/1/16 8:46 PM:
-----------------------------------------------------------

I took a stab at upgrading from log4j to log4j2, which includes porting over the work that
[~thelabdude] did over at https://github.com/lucidworks/solr-log4j2 .. 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 log4j.properties 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 log4j 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. 


was (Author: k317h):
I took a stab at upgrading from log4j to log4j2, which includes porting over the work that
[~thelabdude] did over at https://github.com/lucidworks/solr-log4j2 .. 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 log4j.properties 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: https://issues.apache.org/jira/browse/SOLR-7887
>             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:
> https://blogs.apache.org/foundation/entry/apache_logging_services_project_announces
> 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
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message