logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Created] (LOG4J2-1659) Facilitate shading Log4j into an application's uber jar
Date Wed, 02 Nov 2016 05:37:58 GMT
Gary Gregory created LOG4J2-1659:
------------------------------------

             Summary: Facilitate shading Log4j into an application's uber jar
                 Key: LOG4J2-1659
                 URL: https://issues.apache.org/jira/browse/LOG4J2-1659
             Project: Log4j 2
          Issue Type: Improvement
            Reporter: Gary Gregory


Facilitate shading Log4j into an application's uber jar.

I have a use case where I create an Uber jar for a proprietary JDBC driver and all of its
dependencies, which includes Log4j (now) 2.7.

The result is a big fat jar that gets deployed in JBoss Wildfly 9.

When the server starts up, logging is all messed up:

{noformat}
00:32:06,955 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-api-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,960 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-core-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,961 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-iostreams-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,961 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry icu4j-57.1.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not point
to a valid jar for a Class-Path reference.
00:32:06,962 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry icu4j-charset-57.1.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,962 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-jcl-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,963 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry commons-logging-1.2.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,963 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-jmx-gui-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,963 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-nosql-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,964 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-taglib-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,964 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-web-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,964 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry commons-dbcp2-2.1.1.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,965 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry commons-pool2-2.4.2.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:06,965 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry jansi-1.13.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not point
to a valid jar for a Class-Path reference.
00:32:06,965 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry jcommander-1.48.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does not
point to a valid jar for a Class-Path reference.
00:32:06,966 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-5)  WFLYSRV0059:
Class Path entry log4j-1.2-api-2.7.jar in /content/dv-jdbc-3.1.201610281922-all.jar  does
not point to a valid jar for a Class-Path reference.
00:32:07,435 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [d]
00:32:07,442 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [d] starting at position 16 in conversion pattern.
00:32:07,476 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [thread]
00:32:07,479 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [thread] starting at position 25 in conversion pattern.
00:32:07,492 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [level]
00:32:07,538 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [level] starting at position 35 in conversion pattern.
00:32:07,556 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [logger]
00:32:07,558 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [logger] starting at position 47 in conversion pattern.
00:32:07,558 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [msg]
00:32:07,559 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [msg] starting at position 54 in conversion pattern.
00:32:07,560 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [n]
00:32:07,561 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [n] starting at position 56 in conversion pattern.
00:32:07,593 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger No log4j2 configuration
file found. Using default configuration: logging only errors to the console.
00:32:07,595 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [d]
00:32:07,595 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [d] starting at position 16 in conversion pattern.
00:32:07,596 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [thread]
00:32:07,597 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [thread] starting at position 25 in conversion pattern.
00:32:07,597 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [level]
00:32:07,598 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [level] starting at position 35 in conversion pattern.
00:32:07,598 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [logger]
00:32:07,599 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [logger] starting at position 47 in conversion pattern.
00:32:07,600 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [msg]
00:32:07,600 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [msg] starting at position 54 in conversion pattern.
00:32:07,601 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized format
specifier [n]
00:32:07,602 ERROR [stderr] (MSC service thread 1-2)  ERROR StatusLogger Unrecognized conversion
specifier [n] starting at position 56 in conversion pattern.
{noformat}

What to do?





--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message