From d8b1c88abc94d823c28fe02c0d36b1a5777b7cb0 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 7 Oct 2016 12:48:47 +1100 Subject: [PATCH 1/5] Issue #984 Improve module listing Reworked logging modules added support for ,= and += properties --- .../src/main/config/modules/gcloud.mod | 13 +---- .../org/eclipse/jetty/start/StartArgs.java | 53 +++++++++++-------- .../org/eclipse/jetty/start/usage.txt | 9 ++++ .../usecases/basic-properties.assert.txt | 2 + .../usecases/basic-properties.cmdline.txt | 6 +++ .../config/modules/{jcl.mod => jcl-impl.mod} | 0 .../src/main/config/modules/jcl-slf4j.mod | 3 +- .../src/main/config/modules/jetty-jul.mod | 12 ----- .../src/main/config/modules/jetty-log4j.mod | 12 ----- .../src/main/config/modules/jetty-log4j2.mod | 13 ----- .../src/main/config/modules/jetty-logback.mod | 10 ---- .../src/main/config/modules/jetty-logging.mod | 16 ------ .../src/main/config/modules/jetty-slf4j.mod | 17 ------ .../modules/{log4j.mod => log4j-impl.mod} | 0 .../src/main/config/modules/log4j-log4j2.mod | 4 +- .../src/main/config/modules/log4j2-api.mod | 2 - .../{log4j2-core.mod => log4j2-impl.mod} | 0 .../src/main/config/modules/log4j2-slf4j.mod | 4 +- .../{logback-core.mod => logback-impl.mod} | 2 +- .../src/main/config/modules/logging-jcl.mod | 20 +++++++ .../src/main/config/modules/logging-jetty.mod | 15 ++++++ .../jetty-logging.properties | 0 .../src/main/config/modules/logging-jul.mod | 19 +++++++ .../src/main/config/modules/logging-log4j.mod | 20 +++++++ .../main/config/modules/logging-log4j2.mod | 20 +++++++ .../main/config/modules/logging-logback.mod | 20 +++++++ .../src/main/config/modules/logging-slf4j.mod | 19 +++++++ .../modules/logging/logging-classpath.xml | 13 +++-- .../{slf4j-simple.mod => slf4j-impl.mod} | 0 .../src/main/config/modules/slf4j-jcl.mod | 4 +- .../src/main/config/modules/slf4j-jul.mod | 3 +- .../src/main/config/modules/slf4j-log4j.mod | 4 +- .../src/main/config/modules/slf4j-log4j2.mod | 4 +- .../src/main/config/modules/slf4j-logback.mod | 5 +- .../main/config/modules/stderrout-logging.mod | 1 - .../src/main/config/modules/webapp.mod | 4 +- 36 files changed, 205 insertions(+), 144 deletions(-) rename jetty-util/src/main/config/modules/{jcl.mod => jcl-impl.mod} (100%) delete mode 100644 jetty-util/src/main/config/modules/jetty-jul.mod delete mode 100644 jetty-util/src/main/config/modules/jetty-log4j.mod delete mode 100644 jetty-util/src/main/config/modules/jetty-log4j2.mod delete mode 100644 jetty-util/src/main/config/modules/jetty-logback.mod delete mode 100644 jetty-util/src/main/config/modules/jetty-logging.mod delete mode 100644 jetty-util/src/main/config/modules/jetty-slf4j.mod rename jetty-util/src/main/config/modules/{log4j.mod => log4j-impl.mod} (100%) rename jetty-util/src/main/config/modules/{log4j2-core.mod => log4j2-impl.mod} (100%) rename jetty-util/src/main/config/modules/{logback-core.mod => logback-impl.mod} (93%) create mode 100644 jetty-util/src/main/config/modules/logging-jcl.mod create mode 100644 jetty-util/src/main/config/modules/logging-jetty.mod rename jetty-util/src/main/config/modules/{jetty-logging => logging-jetty}/jetty-logging.properties (100%) create mode 100644 jetty-util/src/main/config/modules/logging-jul.mod create mode 100644 jetty-util/src/main/config/modules/logging-log4j.mod create mode 100644 jetty-util/src/main/config/modules/logging-log4j2.mod create mode 100644 jetty-util/src/main/config/modules/logging-logback.mod create mode 100644 jetty-util/src/main/config/modules/logging-slf4j.mod rename jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud/gcloud.xml => jetty-util/src/main/config/modules/logging/logging-classpath.xml (53%) rename jetty-util/src/main/config/modules/{slf4j-simple.mod => slf4j-impl.mod} (100%) diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud.mod b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud.mod index 1508e7e98d3..2039280ee34 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud.mod +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud.mod @@ -5,23 +5,14 @@ Control GCloud API classpath 3rdparty gcloud -[files] -basehome:modules/gcloud/gcloud.xml|etc/gcloud.xml - [lib] lib/gcloud/*.jar -[xml] -etc/gcloud.xml - [license] GCloudDatastore is an open source project hosted on Github and released under the Apache 2.0 license. https://github.com/GoogleCloudPlatform/gcloud-java http://www.apache.org/licenses/LICENSE-2.0.html [ini-template] -## Configure the jars and packages exposed or hidden from webapps by comma separated -## list of classnames, package names or file URIs (See ClasspathPattern) -## Eg. to hide all gcloud dependencies other than the com.google.guava package: -## Default is all jars in lib/gcloud are hidden -# gcloud.addServerClasses=file:${jetty.base}/lib/gcloud,-com.google.guava. +## Hide the gcloud libraries from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/gcloud/ diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 5a3e94ad119..214242a7c53 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -364,7 +364,7 @@ public class StartArgs } else { - System.out.printf(" %s = %s%n",key,properties.expand(prop.value)); + System.out.printf(" %s = %s%n",key,prop.value); if (StartLog.isDebugEnabled()) { System.out.printf(" origin: %s%n",prop.origin); @@ -372,7 +372,7 @@ public class StartArgs { prop = prop.overrides; System.out.printf(" (overrides)%n"); - System.out.printf(" %s = %s%n",key,properties.expand(prop.value)); + System.out.printf(" %s = %s%n",key,prop.value); System.out.printf(" origin: %s%n",prop.origin); } } @@ -398,7 +398,7 @@ public class StartArgs for (String key : sortedKeys) { String value = System.getProperty(key); - System.out.printf(" %s = %s%n",key,properties.expand(value)); + System.out.printf(" %s = %s%n",key,value); } } @@ -1050,13 +1050,33 @@ public class StartArgs } // Is this a raw property declaration? - int idx = arg.indexOf('='); - if (idx >= 0) + int equals = arg.indexOf('='); + if (equals >= 0) { - String key = arg.substring(0,idx); - String value = arg.substring(idx + 1); + String key = arg.substring(0,equals); + String value = arg.substring(equals + 1); - if (replaceProps) + if (key.endsWith("+")) + { + key = key.substring(0,key.length()-1); + String orig = getProperties().getString(key); + if (orig != null && !orig.isEmpty()) + { + value=orig+value; + source=propertySource.get(key)+","+source; + } + } + else if (key.endsWith(",")) + { + key = key.substring(0,key.length()-1); + String orig = getProperties().getString(key); + if (orig != null && !orig.isEmpty()) + { + value=value.isEmpty()?orig:(orig+","+value); + source=propertySource.get(key)+","+source; + } + } + else if (replaceProps) { if (propertySource.containsKey(key)) { @@ -1065,21 +1085,10 @@ public class StartArgs propertySource.put(key,source); } - if ("OPTION".equals(key) || "OPTIONS".equals(key)) - { - StringBuilder warn = new StringBuilder(); - warn.append("The behavior of the argument "); - warn.append(arg).append(" (seen in ").append(source); - warn.append(") has changed, and is now considered a normal property. "); - warn.append(key).append(" no longer controls what libraries are on your classpath,"); - warn.append(" use --module instead. See --help for details."); - StartLog.warn(warn.toString()); - } - setProperty(key,value,source,replaceProps); return; } - + // Is this an xml file? if (FS.isXml(arg)) { @@ -1184,7 +1193,9 @@ public class StartArgs return; } - if (replaceProp || (!properties.containsKey(key))) + if (value==null || value.isEmpty()) + properties.remove(key,value,source); + else if (replaceProp || (!properties.containsKey(key))) { properties.setProperty(key,value,source); if(key.equals("java.version")) diff --git a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt index fad5157f0ae..44e39c2c8b8 100644 --- a/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt +++ b/jetty-start/src/main/resources/org/eclipse/jetty/start/usage.txt @@ -147,6 +147,15 @@ Startup / Shutdown Command Line: Properties: + name=value + Set a property that can be expanded in XML files with the element. + + name+=value + Add to an existing property. + + name,=value + Add to an existing property as a comma separated list. + STOP.HOST=[string] The host to use to stop the running Jetty server (defaults to 127.0.0.1) Required along with STOP.PORT if you want to use the --stop option above. diff --git a/jetty-start/src/test/resources/usecases/basic-properties.assert.txt b/jetty-start/src/test/resources/usecases/basic-properties.assert.txt index 4e90c5d74ae..e0c620efe12 100644 --- a/jetty-start/src/test/resources/usecases/basic-properties.assert.txt +++ b/jetty-start/src/test/resources/usecases/basic-properties.assert.txt @@ -12,3 +12,5 @@ PROP|main.prop=value0 PROP|port=9090 PROP|other=value PROP|jetty.http.port=9090 +PROP|add=beginningmiddleend +PROP|list=one,two,three diff --git a/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt b/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt index 8c38c4dcd41..759df59e929 100644 --- a/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt +++ b/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt @@ -1,2 +1,8 @@ other=value port=9090 +add+=beginning +add+=middle +add+=end +list,=one +list,=two +list,=three diff --git a/jetty-util/src/main/config/modules/jcl.mod b/jetty-util/src/main/config/modules/jcl-impl.mod similarity index 100% rename from jetty-util/src/main/config/modules/jcl.mod rename to jetty-util/src/main/config/modules/jcl-impl.mod diff --git a/jetty-util/src/main/config/modules/jcl-slf4j.mod b/jetty-util/src/main/config/modules/jcl-slf4j.mod index 34c9daf7cfd..9e4785cf597 100644 --- a/jetty-util/src/main/config/modules/jcl-slf4j.mod +++ b/jetty-util/src/main/config/modules/jcl-slf4j.mod @@ -1,6 +1,5 @@ [description] -Provides a Java Commons Logging implementation that logs to the SLF4J API. -Requires another module that provides and SLF4J implementation. +Provides a Java Commons Logging (JCL) to SLF4J logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/jetty-jul.mod b/jetty-util/src/main/config/modules/jetty-jul.mod deleted file mode 100644 index 78b91462799..00000000000 --- a/jetty-util/src/main/config/modules/jetty-jul.mod +++ /dev/null @@ -1,12 +0,0 @@ -[description] -Provides a Jetty Logging implementation that logs to the Java Util Logging API. -Requires another module that provides a Java Util Logging implementation. - -[tags] -logging - -[provide] -logging - -[exec] --Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.JavaUtilLog diff --git a/jetty-util/src/main/config/modules/jetty-log4j.mod b/jetty-util/src/main/config/modules/jetty-log4j.mod deleted file mode 100644 index 7b22d0e39ca..00000000000 --- a/jetty-util/src/main/config/modules/jetty-log4j.mod +++ /dev/null @@ -1,12 +0,0 @@ -[description] -Provides a Jetty Logging implementation that logs to the log4j API. -Uses the slf4j mechanism as an intermediary -Requires another module that provides an log4j implementation. - -[tags] -logging -log4j - -[depend] -jetty-slf4j -slf4j-log4j diff --git a/jetty-util/src/main/config/modules/jetty-log4j2.mod b/jetty-util/src/main/config/modules/jetty-log4j2.mod deleted file mode 100644 index 045d639adc3..00000000000 --- a/jetty-util/src/main/config/modules/jetty-log4j2.mod +++ /dev/null @@ -1,13 +0,0 @@ -[description] -Provides a Jetty Logging implementation that logs to the log4j API. -Uses the slf4j and log4j v1.2 mechanisms as intermediaries. -Requires another module that provides an log4j2 implementation. - -[tags] -logging -log4j2 -log4j - -[depend] -jetty-slf4j -slf4j-log4j2 diff --git a/jetty-util/src/main/config/modules/jetty-logback.mod b/jetty-util/src/main/config/modules/jetty-logback.mod deleted file mode 100644 index 0d6b1ce57c5..00000000000 --- a/jetty-util/src/main/config/modules/jetty-logback.mod +++ /dev/null @@ -1,10 +0,0 @@ -[description] -Provides a Jetty Logging implementation that logs to logback. -Uses the slf4j API as an intermediary - -[tags] -logging - -[depend] -jetty-slf4j -slf4j-logback diff --git a/jetty-util/src/main/config/modules/jetty-logging.mod b/jetty-util/src/main/config/modules/jetty-logging.mod deleted file mode 100644 index fcb4c749c22..00000000000 --- a/jetty-util/src/main/config/modules/jetty-logging.mod +++ /dev/null @@ -1,16 +0,0 @@ -[description] -Enables the Jetty Logging implementation and installs a template -configuration in ${jetty.base} resources/jetty-logging.properties. - -[tags] -logging - -[depends] -resources - -[provide] -logging - -[files] -basehome:modules/jetty-logging/jetty-logging.properties|resources/jetty-logging.properties - diff --git a/jetty-util/src/main/config/modules/jetty-slf4j.mod b/jetty-util/src/main/config/modules/jetty-slf4j.mod deleted file mode 100644 index b0d68ed509a..00000000000 --- a/jetty-util/src/main/config/modules/jetty-slf4j.mod +++ /dev/null @@ -1,17 +0,0 @@ -[description] -Provides a Jetty Logging implementation that logs to the SLF4J API. -Requires another module that provides and SLF4J implementation. - -[tags] -logging -slf4j - -[depend] -slf4j-api -slf4j-impl - -[provide] -logging - -[exec] --Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog diff --git a/jetty-util/src/main/config/modules/log4j.mod b/jetty-util/src/main/config/modules/log4j-impl.mod similarity index 100% rename from jetty-util/src/main/config/modules/log4j.mod rename to jetty-util/src/main/config/modules/log4j-impl.mod diff --git a/jetty-util/src/main/config/modules/log4j-log4j2.mod b/jetty-util/src/main/config/modules/log4j-log4j2.mod index 63861d5b6a1..2007863f99e 100644 --- a/jetty-util/src/main/config/modules/log4j-log4j2.mod +++ b/jetty-util/src/main/config/modules/log4j-log4j2.mod @@ -1,7 +1,5 @@ [description] -Provides a Log4j v1.2 implementation that logs to the Log4j v2 API. -Requires another module that provides and Log4j v2 implementation. -To receive jetty logs the jetty-slf4j and slf4j-log4j must also be enabled. +Provides a Log4j v1.2 to Log4j v2 logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/log4j2-api.mod b/jetty-util/src/main/config/modules/log4j2-api.mod index 3b1ce7dee76..f2d2f9bfd75 100644 --- a/jetty-util/src/main/config/modules/log4j2-api.mod +++ b/jetty-util/src/main/config/modules/log4j2-api.mod @@ -1,7 +1,5 @@ [description] Provides the Log4j v2 API -Requires another module that provides an Log4j v2 implementation. -To receive jetty logs enable the jetty-slf4j, slf4j-log4j and log4j-log4j2 modules. [tags] logging diff --git a/jetty-util/src/main/config/modules/log4j2-core.mod b/jetty-util/src/main/config/modules/log4j2-impl.mod similarity index 100% rename from jetty-util/src/main/config/modules/log4j2-core.mod rename to jetty-util/src/main/config/modules/log4j2-impl.mod diff --git a/jetty-util/src/main/config/modules/log4j2-slf4j.mod b/jetty-util/src/main/config/modules/log4j2-slf4j.mod index 0dad0102f2f..f69c49e8b1b 100644 --- a/jetty-util/src/main/config/modules/log4j2-slf4j.mod +++ b/jetty-util/src/main/config/modules/log4j2-slf4j.mod @@ -1,7 +1,5 @@ [description] -Provides a Log4j v2 implementation that logs to the SLF4J API. -Requires another module that provides and SLF4J implementation. -To receive jetty logs enable the jetty-slf4j module. +Provides a Log4j v2 to SLF4J logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/logback-core.mod b/jetty-util/src/main/config/modules/logback-impl.mod similarity index 93% rename from jetty-util/src/main/config/modules/logback-core.mod rename to jetty-util/src/main/config/modules/logback-impl.mod index ab2d9cea0ca..c06607c7b0c 100644 --- a/jetty-util/src/main/config/modules/logback-core.mod +++ b/jetty-util/src/main/config/modules/logback-impl.mod @@ -1,5 +1,5 @@ [description] -Provides the logback core implementation, used by slf4j-logback +Provides the logback core implementation and logback-access [tags] diff --git a/jetty-util/src/main/config/modules/logging-jcl.mod b/jetty-util/src/main/config/modules/logging-jcl.mod new file mode 100644 index 00000000000..718affe557f --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-jcl.mod @@ -0,0 +1,20 @@ +[description] +Configure jetty logging to use Java Commons Logging (jcl) +Uses SLF4j as a logging bridge. + +[tags] +logging + +[depends] +slf4j-jcl +jcl-impl + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/,file:${jetty.base}/lib/jul diff --git a/jetty-util/src/main/config/modules/logging-jetty.mod b/jetty-util/src/main/config/modules/logging-jetty.mod new file mode 100644 index 00000000000..c7ad54ec27e --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-jetty.mod @@ -0,0 +1,15 @@ +[description] +Configure jetty logging mechanism. +Provides a ${jetty.base}/resources/jetty-logging.properties. + +[tags] +logging + +[depends] +resources + +[provide] +logging + +[files] +basehome:modules/logging-jetty/jetty-logging.properties|resources/jetty-logging.properties diff --git a/jetty-util/src/main/config/modules/jetty-logging/jetty-logging.properties b/jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties similarity index 100% rename from jetty-util/src/main/config/modules/jetty-logging/jetty-logging.properties rename to jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties diff --git a/jetty-util/src/main/config/modules/logging-jul.mod b/jetty-util/src/main/config/modules/logging-jul.mod new file mode 100644 index 00000000000..7c7323c8a90 --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-jul.mod @@ -0,0 +1,19 @@ +[description] +Configure jetty logging to use Java Util Logging (jul) +Uses SLF4j as a logging bridge. + +[tags] +logging + +[depends] +slf4j-jul + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/ diff --git a/jetty-util/src/main/config/modules/logging-log4j.mod b/jetty-util/src/main/config/modules/logging-log4j.mod new file mode 100644 index 00000000000..ce81ca8ae23 --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-log4j.mod @@ -0,0 +1,20 @@ +[description] +Configure jetty logging to use Log4j Logging +Uses SLF4j as a logging bridge. + +[tags] +logging + +[depends] +slf4j-log4j +log4j-impl + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/,file:${jetty.base}/lib/log4j/ diff --git a/jetty-util/src/main/config/modules/logging-log4j2.mod b/jetty-util/src/main/config/modules/logging-log4j2.mod new file mode 100644 index 00000000000..81bbcf056df --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-log4j2.mod @@ -0,0 +1,20 @@ +[description] +Configure jetty logging to use log4j version 2 +Uses SLF4j as a logging bridge. + +[tags] +logging + +[depends] +slf4j-log4j2 +log4j2-impl + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/,file:${jetty.base}/lib/log4j/ diff --git a/jetty-util/src/main/config/modules/logging-logback.mod b/jetty-util/src/main/config/modules/logging-logback.mod new file mode 100644 index 00000000000..8223bce022a --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-logback.mod @@ -0,0 +1,20 @@ +[description] +Configure jetty logging to use Logback Logging. +Uses SLF4j as a logging bridge. + +[tags] +logging + +[depends] +slf4j-logback +logback-impl + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/,file:${jetty.base}/lib/logback diff --git a/jetty-util/src/main/config/modules/logging-slf4j.mod b/jetty-util/src/main/config/modules/logging-slf4j.mod new file mode 100644 index 00000000000..24b5f367cc7 --- /dev/null +++ b/jetty-util/src/main/config/modules/logging-slf4j.mod @@ -0,0 +1,19 @@ +[description] +Configure jetty logging to use slf4j. +Any slf4j-impl implementation is used + +[tags] +logging + +[depends] +slf4j-impl + +[provide] +logging + +[exec] +-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog + +[ini-template] +## Hide logging classes from deployed webapps +jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/ diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud/gcloud.xml b/jetty-util/src/main/config/modules/logging/logging-classpath.xml similarity index 53% rename from jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud/gcloud.xml rename to jetty-util/src/main/config/modules/logging/logging-classpath.xml index 45daf215c1f..1f8e737e9bf 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/config/modules/gcloud/gcloud.xml +++ b/jetty-util/src/main/config/modules/logging/logging-classpath.xml @@ -2,15 +2,20 @@ + + + + + + + + - - - - file:/lib/gcloud + diff --git a/jetty-util/src/main/config/modules/slf4j-simple.mod b/jetty-util/src/main/config/modules/slf4j-impl.mod similarity index 100% rename from jetty-util/src/main/config/modules/slf4j-simple.mod rename to jetty-util/src/main/config/modules/slf4j-impl.mod diff --git a/jetty-util/src/main/config/modules/slf4j-jcl.mod b/jetty-util/src/main/config/modules/slf4j-jcl.mod index 9d7f3949fb9..1e85934f6fc 100644 --- a/jetty-util/src/main/config/modules/slf4j-jcl.mod +++ b/jetty-util/src/main/config/modules/slf4j-jcl.mod @@ -1,7 +1,5 @@ [description] -Provides a SLF4J implementation that logs to the Java Commons Logging API. -Requires another module that provides an JCL implementation. -To receive jetty logs enable the jetty-slf4j module. +Provides a SLF4J to Java Commons Logging (JCL) logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/slf4j-jul.mod b/jetty-util/src/main/config/modules/slf4j-jul.mod index b277a2ed065..9a674754f08 100644 --- a/jetty-util/src/main/config/modules/slf4j-jul.mod +++ b/jetty-util/src/main/config/modules/slf4j-jul.mod @@ -1,6 +1,5 @@ [description] -Provides a SLF4J implementation that logs to the Java Util Logging API. -To receive jetty logs enable the jetty-slf4j module. +Provides a SLF4J to Java Util Logging (JUL) logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/slf4j-log4j.mod b/jetty-util/src/main/config/modules/slf4j-log4j.mod index fffa7b61d23..3faa5c56faa 100644 --- a/jetty-util/src/main/config/modules/slf4j-log4j.mod +++ b/jetty-util/src/main/config/modules/slf4j-log4j.mod @@ -1,7 +1,5 @@ [description] -Provides a SLF4J implementation that logs to the Log4j v1.2 API. -Requires another module that provides a Log4j implementation. -To receive jetty logs enable the jetty-slf4j module. +Provides a SLF4J to the Log4j v1.2 API logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/slf4j-log4j2.mod b/jetty-util/src/main/config/modules/slf4j-log4j2.mod index 57ee3affd87..19978f49615 100644 --- a/jetty-util/src/main/config/modules/slf4j-log4j2.mod +++ b/jetty-util/src/main/config/modules/slf4j-log4j2.mod @@ -1,7 +1,5 @@ [description] -Provides a SLF4J implementation that logs to the Log4j v2 API. -Requires another module that provides a Log4j2 implementation. -To receive jetty logs enable the jetty-slf4j2 module. +Provides a SLF4J to Log4j v2 logging bridge. [tags] logging diff --git a/jetty-util/src/main/config/modules/slf4j-logback.mod b/jetty-util/src/main/config/modules/slf4j-logback.mod index 185096b24aa..48d1b062eff 100644 --- a/jetty-util/src/main/config/modules/slf4j-logback.mod +++ b/jetty-util/src/main/config/modules/slf4j-logback.mod @@ -1,6 +1,5 @@ [description] -Provides a SLF4J implementation that logs to Logback classic -To receive jetty logs enable the jetty-slf4j module. +Provides a SLF4J to Logback logging bridge. [tags] logging @@ -9,7 +8,7 @@ verbose [depend] slf4j-api -logback-core +logback-impl resources [provide] diff --git a/jetty-util/src/main/config/modules/stderrout-logging.mod b/jetty-util/src/main/config/modules/stderrout-logging.mod index 77952ac54f9..b1dc2af91e6 100644 --- a/jetty-util/src/main/config/modules/stderrout-logging.mod +++ b/jetty-util/src/main/config/modules/stderrout-logging.mod @@ -12,7 +12,6 @@ etc/stderrout-logging.xml logs/ [lib] -lib/logging/**.jar resources/ [ini-template] diff --git a/jetty-webapp/src/main/config/modules/webapp.mod b/jetty-webapp/src/main/config/modules/webapp.mod index fe1a13d8972..83e2d839d1d 100644 --- a/jetty-webapp/src/main/config/modules/webapp.mod +++ b/jetty-webapp/src/main/config/modules/webapp.mod @@ -24,5 +24,5 @@ lib/jetty-webapp-${jetty.version}.jar ## + a directory of jars,resource or classes e.g. 'file:${jetty.base}/resources' ## + A pattern preceeded with a '-' is an exclusion, all other patterns are inclusions ## -#jetty.webapp.addSystemClasses= -#jetty.webapp.addServerClasses= +jetty.webapp.addSystemClasses,= +jetty.webapp.addServerClasses,= From 33b290c8b2587a6bbc2fd5cb5ce315271ae0a1d0 Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 7 Oct 2016 14:12:17 +1100 Subject: [PATCH 2/5] Issue #984 Improve module listing Transient modules only created in ini if directly added improved list-modules --- jetty-distribution/pom.xml | 2 +- .../org/eclipse/jetty/start/BaseBuilder.java | 36 +++++++++++++++---- .../java/org/eclipse/jetty/start/Modules.java | 7 ++-- .../jetty/start/builders/StartDirBuilder.java | 16 +++------ .../jetty/start/builders/StartIniBuilder.java | 19 +++------- .../usecases/empty.addToStart.assert.txt | 2 +- .../empty.addToStartCreateStartd.assert.txt | 3 +- .../usecases/empty.createStartd.assert.txt | 3 +- .../modules/transient.mod | 3 ++ 9 files changed, 49 insertions(+), 42 deletions(-) diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml index 2b1b1318c22..463922fbe8d 100644 --- a/jetty-distribution/pom.xml +++ b/jetty-distribution/pom.xml @@ -329,7 +329,7 @@ jetty.home=${assembly-directory} jetty.base=${assembly-directory} - --add-to-start=deploy,websocket,ext,resources,jsp,jstl,http + --add-to-start=server,deploy,websocket,ext,resources,jsp,jstl,http diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java index 11d74334669..9062044f177 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java @@ -50,11 +50,10 @@ public class BaseBuilder * * @param module * the module to add - * @return true if module was added, false if module was not added - * (because that module already exists) + * @return The ini file if module was added, null if module was not added. * @throws IOException if unable to add the module */ - public boolean addModule(Module module) throws IOException; + public String addModule(Module module) throws IOException; } private static final String EXITING_LICENSE_NOT_ACKNOWLEDGED = "Exiting: license not acknowledged!"; @@ -181,7 +180,6 @@ public class BaseBuilder if (!newly_added.isEmpty()) { - if (Files.exists(startini) && Files.exists(startd)) StartLog.warn("Use both %s and %s is deprecated",getBaseHome().toShortForm(startd),getBaseHome().toShortForm(startini)); @@ -189,6 +187,7 @@ public class BaseBuilder builder.set(useStartD?new StartDirBuilder(this):new StartIniBuilder(this)); newly_added.stream().map(n->modules.get(n)).forEach(module -> { + String ini=null; try { if (module.isSkipFilesValidation()) @@ -197,8 +196,13 @@ public class BaseBuilder } else { - if (builder.get().addModule(module)) - modified.set(true); + // if (explictly added and ini file modified) + if (startArgs.getStartModules().contains(module.getName())) + { + ini=builder.get().addModule(module); + if (ini!=null) + modified.set(true); + } for (String file : module.getFiles()) files.add(new FileArg(module,startArgs.getProperties().expand(file))); } @@ -207,6 +211,26 @@ public class BaseBuilder { throw new RuntimeException(e); } + + if (module.isDynamic()) + { + for (String s:module.getEnableSources()) + StartLog.info("%-15s %s",module.getName(),s); + } + else if (module.isTransitive()) + { + if (module.hasIniTemplate()) + StartLog.info("%-15s transitive, ini template available with --add-to-start=%s", + module.getName(), + module.getName()); + else + StartLog.info("%-15s transitive",module.getName()); + } + else + StartLog.info("%-15s initialized in %s", + module.getName(), + ini); + }); } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java index 23eed50c70f..0a1a3bf577a 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Modules.java @@ -158,6 +158,8 @@ public class Modules implements Iterable index=""; name=""; } + if (module.isTransitive() && module.hasIniTemplate()) + System.out.printf(" init template available with --add-to-start=%s%n",module.getName()); } } @@ -312,9 +314,6 @@ public class Modules implements Iterable m.expandProperties(_args.getProperties()); } } - else if (module.isTransitive() && module.hasIniTemplate()) - newlyEnabled.add(module.getName()); - // Process module dependencies (always processed as may be dynamic) for(String dependsOn:module.getDepends()) @@ -351,7 +350,7 @@ public class Modules implements Iterable // Is there an obvious default? Optional dftProvider = providers.stream().filter(m->m.getName().equals(dependsOn)).findFirst(); if (dftProvider.isPresent()) - enable(newlyEnabled,dftProvider.get(),"default provider of "+dependsOn+" for "+module.getName(),true); + enable(newlyEnabled,dftProvider.get(),"transitive provider of "+dependsOn+" for "+module.getName(),true); else if (StartLog.isDebugEnabled()) StartLog.debug("Module %s requires %s from one of %s",module,dependsOn,providers); } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartDirBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartDirBuilder.java index 5f6fca2ae87..23b239c6566 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartDirBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartDirBuilder.java @@ -50,7 +50,7 @@ public class StartDirBuilder implements BaseBuilder.Config } @Override - public boolean addModule(Module module) throws IOException + public String addModule(Module module) throws IOException { if (module.isDynamic()) { @@ -59,28 +59,20 @@ public class StartDirBuilder implements BaseBuilder.Config // warn StartLog.warn("%-15s not adding [ini-template] from dynamic module",module.getName()); } - return false; - } - - String mode = ""; - if (module.isTransitive()) - { - mode = "(transitively) "; + return null; } if (module.hasIniTemplate() || !module.isTransitive()) { // Create start.d/{name}.ini Path ini = startDir.resolve(module.getName() + ".ini"); - StartLog.info("%-15s initialised %sin %s",module.getName(),mode,baseHome.toShortForm(ini)); - try (BufferedWriter writer = Files.newBufferedWriter(ini,StandardCharsets.UTF_8,StandardOpenOption.CREATE,StandardOpenOption.TRUNCATE_EXISTING)) { module.writeIniSection(writer); } - return true; + return baseHome.toShortForm(ini); } - return false; + return null; } } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java index dbfdc209934..369837032be 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/builders/StartIniBuilder.java @@ -21,7 +21,6 @@ package org.eclipse.jetty.start.builders; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; -import java.io.PrintWriter; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; @@ -86,13 +85,13 @@ public class StartIniBuilder implements BaseBuilder.Config } @Override - public boolean addModule(Module module) throws IOException + public String addModule(Module module) throws IOException { if (modulesPresent.contains(module.getName())) { StartLog.info("%-15s already initialised in %s",module.getName(),baseHome.toShortForm(startIni)); // skip, already present - return false; + return null; } if (module.isDynamic()) @@ -102,27 +101,19 @@ public class StartIniBuilder implements BaseBuilder.Config // warn StartLog.warn("%-15s not adding [ini-template] from dynamic module",module.getName()); } - return false; - } - - String mode = ""; - if (module.isTransitive()) - { - mode = "(transitively) "; + return null; } if (module.hasIniTemplate() || !module.isTransitive()) { - StartLog.info("%-15s initialised %sin %s",module.getName(),mode,baseHome.toShortForm(startIni)); - // Append to start.ini try (BufferedWriter writer = Files.newBufferedWriter(startIni,StandardCharsets.UTF_8,StandardOpenOption.APPEND,StandardOpenOption.CREATE)) { module.writeIniSection(writer); } - return true; + return baseHome.toShortForm(startIni); } - return false; + return null; } } diff --git a/jetty-start/src/test/resources/usecases/empty.addToStart.assert.txt b/jetty-start/src/test/resources/usecases/empty.addToStart.assert.txt index 10651695c51..9b2e1bbaa03 100644 --- a/jetty-start/src/test/resources/usecases/empty.addToStart.assert.txt +++ b/jetty-start/src/test/resources/usecases/empty.addToStart.assert.txt @@ -14,7 +14,7 @@ LIB|${jetty.home}/lib/extra/extra1.jar # The Properties we expect (order is irrelevant) PROP|extra.prop=value0 -PROP|main.prop=valueT +PROP|main.prop=value0 PROP|optional.prop=value0 # Files / Directories to create diff --git a/jetty-start/src/test/resources/usecases/empty.addToStartCreateStartd.assert.txt b/jetty-start/src/test/resources/usecases/empty.addToStartCreateStartd.assert.txt index 6b2ed3d8921..2445f98b829 100644 --- a/jetty-start/src/test/resources/usecases/empty.addToStartCreateStartd.assert.txt +++ b/jetty-start/src/test/resources/usecases/empty.addToStartCreateStartd.assert.txt @@ -14,12 +14,11 @@ LIB|${jetty.home}/lib/extra/extra1.jar # The Properties we expect (order is irrelevant) PROP|extra.prop=value0 -PROP|main.prop=valueT +PROP|main.prop=value0 PROP|optional.prop=value0 # Files / Directories to create EXISTS|maindir/ -EXISTS|start.d/main.ini EXISTS|start.d/extra.ini EXISTS|start.d/optional.ini diff --git a/jetty-start/src/test/resources/usecases/empty.createStartd.assert.txt b/jetty-start/src/test/resources/usecases/empty.createStartd.assert.txt index 01db3aca0da..91c169d0621 100644 --- a/jetty-start/src/test/resources/usecases/empty.createStartd.assert.txt +++ b/jetty-start/src/test/resources/usecases/empty.createStartd.assert.txt @@ -14,12 +14,11 @@ LIB|${jetty.home}/lib/extra/extra1.jar # The Properties we expect (order is irrelevant) PROP|extra.prop=value0 -PROP|main.prop=valueT +PROP|main.prop=value0 PROP|optional.prop=value0 # Files / Directories to create EXISTS|maindir/ EXISTS|start.d/ -EXISTS|start.d/main.ini EXISTS|start.d/extra.ini EXISTS|start.d/optional.ini diff --git a/jetty-start/src/test/resources/usecases/transientWithoutIniTemplate/modules/transient.mod b/jetty-start/src/test/resources/usecases/transientWithoutIniTemplate/modules/transient.mod index 222f937fecc..57a3e004817 100644 --- a/jetty-start/src/test/resources/usecases/transientWithoutIniTemplate/modules/transient.mod +++ b/jetty-start/src/test/resources/usecases/transientWithoutIniTemplate/modules/transient.mod @@ -4,5 +4,8 @@ etc/t.xml [optional] main +[ini] +transient.option=transient + [ini-template] transient.option=transient From 0142bcde8feafa163c7b963365832fde91df16ee Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Fri, 7 Oct 2016 20:27:38 +1100 Subject: [PATCH 3/5] Issue #984 Improve module listing renamed verbose to internal module tag --- jetty-server/src/main/config/modules/jvm.mod | 2 +- .../src/main/java/org/eclipse/jetty/start/StartArgs.java | 2 +- jetty-util/src/main/config/modules/jcl-impl.mod | 2 +- jetty-util/src/main/config/modules/jcl-slf4j.mod | 2 +- jetty-util/src/main/config/modules/log4j-impl.mod | 2 +- jetty-util/src/main/config/modules/log4j-log4j2.mod | 2 +- jetty-util/src/main/config/modules/log4j2-api.mod | 2 +- jetty-util/src/main/config/modules/log4j2-impl.mod | 2 +- jetty-util/src/main/config/modules/log4j2-slf4j.mod | 2 +- jetty-util/src/main/config/modules/logback-impl.mod | 2 +- jetty-util/src/main/config/modules/slf4j-api.mod | 2 +- jetty-util/src/main/config/modules/slf4j-impl.mod | 2 +- jetty-util/src/main/config/modules/slf4j-jcl.mod | 2 +- jetty-util/src/main/config/modules/slf4j-jul.mod | 2 +- jetty-util/src/main/config/modules/slf4j-log4j.mod | 2 +- jetty-util/src/main/config/modules/slf4j-log4j2.mod | 2 +- jetty-util/src/main/config/modules/slf4j-logback.mod | 2 +- 17 files changed, 17 insertions(+), 17 deletions(-) diff --git a/jetty-server/src/main/config/modules/jvm.mod b/jetty-server/src/main/config/modules/jvm.mod index b6793e3b03b..30b0d966b96 100644 --- a/jetty-server/src/main/config/modules/jvm.mod +++ b/jetty-server/src/main/config/modules/jvm.mod @@ -17,7 +17,7 @@ setting JVM arguments (eg -Xmx ) # -XX:+CMSClassUnloadingEnabled # -XX:+UseCMSCompactAtFullCollection # -XX:CMSInitiatingOccupancyFraction=80 -# -verbose:gc +# -internal:gc # -XX:+PrintGCDateStamps # -XX:+PrintGCTimeStamps # -XX:+PrintGCDetails diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java index 214242a7c53..ec6397fb777 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/StartArgs.java @@ -949,7 +949,7 @@ public class StartArgs // Module Management if ("--list-modules".equals(arg)) { - listModules = Collections.singletonList("-verbose"); + listModules = Collections.singletonList("-internal"); run = false; return; } diff --git a/jetty-util/src/main/config/modules/jcl-impl.mod b/jetty-util/src/main/config/modules/jcl-impl.mod index b3f0240ce3b..6569c5c52e4 100644 --- a/jetty-util/src/main/config/modules/jcl-impl.mod +++ b/jetty-util/src/main/config/modules/jcl-impl.mod @@ -5,7 +5,7 @@ To receive jetty logs the jetty-slf4j and slf4j-jcl must also be enabled. [tags] logging jcl -verbose +internal [depends] diff --git a/jetty-util/src/main/config/modules/jcl-slf4j.mod b/jetty-util/src/main/config/modules/jcl-slf4j.mod index 9e4785cf597..7cabf92dcaa 100644 --- a/jetty-util/src/main/config/modules/jcl-slf4j.mod +++ b/jetty-util/src/main/config/modules/jcl-slf4j.mod @@ -5,7 +5,7 @@ Provides a Java Commons Logging (JCL) to SLF4J logging bridge. logging jcl slf4j -verbose +internal [depends] slf4j-api diff --git a/jetty-util/src/main/config/modules/log4j-impl.mod b/jetty-util/src/main/config/modules/log4j-impl.mod index 17e3ed8a639..be7bd2c0249 100644 --- a/jetty-util/src/main/config/modules/log4j-impl.mod +++ b/jetty-util/src/main/config/modules/log4j-impl.mod @@ -5,7 +5,7 @@ To receive jetty logs enable the jetty-slf4j and slf4j-log4j modules. [tags] logging log4j -verbose +internal [depends] resources diff --git a/jetty-util/src/main/config/modules/log4j-log4j2.mod b/jetty-util/src/main/config/modules/log4j-log4j2.mod index 2007863f99e..b17cf60e9c6 100644 --- a/jetty-util/src/main/config/modules/log4j-log4j2.mod +++ b/jetty-util/src/main/config/modules/log4j-log4j2.mod @@ -5,7 +5,7 @@ Provides a Log4j v1.2 to Log4j v2 logging bridge. logging log4j2 log4j -verbose +internal [depends] log4j2-api diff --git a/jetty-util/src/main/config/modules/log4j2-api.mod b/jetty-util/src/main/config/modules/log4j2-api.mod index f2d2f9bfd75..cd54e43e2b5 100644 --- a/jetty-util/src/main/config/modules/log4j2-api.mod +++ b/jetty-util/src/main/config/modules/log4j2-api.mod @@ -5,7 +5,7 @@ Provides the Log4j v2 API logging log4j2 log4j -verbose +internal [files] maven://org.apache.logging.log4j/log4j-api/${log4j2.version}|lib/log4j/log4j-api-${log4j2.version}.jar diff --git a/jetty-util/src/main/config/modules/log4j2-impl.mod b/jetty-util/src/main/config/modules/log4j2-impl.mod index 599215067c0..767c40cee57 100644 --- a/jetty-util/src/main/config/modules/log4j2-impl.mod +++ b/jetty-util/src/main/config/modules/log4j2-impl.mod @@ -6,7 +6,7 @@ To receive jetty logs enable the jetty-slf4j, slf4j-log4j and log4j-log4j2 modul logging log4j2 log4j -verbose +internal [depends] log4j2-api diff --git a/jetty-util/src/main/config/modules/log4j2-slf4j.mod b/jetty-util/src/main/config/modules/log4j2-slf4j.mod index f69c49e8b1b..20ea8bb72b6 100644 --- a/jetty-util/src/main/config/modules/log4j2-slf4j.mod +++ b/jetty-util/src/main/config/modules/log4j2-slf4j.mod @@ -6,7 +6,7 @@ logging log4j2 log4j slf4j -verbose +internal [depends] log4j2-api diff --git a/jetty-util/src/main/config/modules/logback-impl.mod b/jetty-util/src/main/config/modules/logback-impl.mod index c06607c7b0c..a6d3db96d36 100644 --- a/jetty-util/src/main/config/modules/logback-impl.mod +++ b/jetty-util/src/main/config/modules/logback-impl.mod @@ -4,7 +4,7 @@ and logback-access [tags] logging -verbose +internal [files] maven://ch.qos.logback/logback-core/${logback.version}|lib/logback/logback-core-${logback.version}.jar diff --git a/jetty-util/src/main/config/modules/slf4j-api.mod b/jetty-util/src/main/config/modules/slf4j-api.mod index a20b67e9b42..e2e787f8c4f 100644 --- a/jetty-util/src/main/config/modules/slf4j-api.mod +++ b/jetty-util/src/main/config/modules/slf4j-api.mod @@ -5,7 +5,7 @@ otherwise a noop implementation is used. [tags] logging slf4j -verbose +internal [files] maven://org.slf4j/slf4j-api/${slf4j.version}|lib/slf4j/slf4j-api-${slf4j.version}.jar diff --git a/jetty-util/src/main/config/modules/slf4j-impl.mod b/jetty-util/src/main/config/modules/slf4j-impl.mod index 8fab77cc1f4..c44b8bd739c 100644 --- a/jetty-util/src/main/config/modules/slf4j-impl.mod +++ b/jetty-util/src/main/config/modules/slf4j-impl.mod @@ -5,7 +5,7 @@ To receive jetty logs enable the jetty-slf4j module. [tags] logging slf4j -verbose +internal [depend] slf4j-api diff --git a/jetty-util/src/main/config/modules/slf4j-jcl.mod b/jetty-util/src/main/config/modules/slf4j-jcl.mod index 1e85934f6fc..d1819515258 100644 --- a/jetty-util/src/main/config/modules/slf4j-jcl.mod +++ b/jetty-util/src/main/config/modules/slf4j-jcl.mod @@ -5,7 +5,7 @@ Provides a SLF4J to Java Commons Logging (JCL) logging bridge. logging jcl slf4j -verbose +internal [depend] slf4j-api diff --git a/jetty-util/src/main/config/modules/slf4j-jul.mod b/jetty-util/src/main/config/modules/slf4j-jul.mod index 9a674754f08..f308147e021 100644 --- a/jetty-util/src/main/config/modules/slf4j-jul.mod +++ b/jetty-util/src/main/config/modules/slf4j-jul.mod @@ -4,7 +4,7 @@ Provides a SLF4J to Java Util Logging (JUL) logging bridge. [tags] logging slf4j -verbose +internal [depend] slf4j-api diff --git a/jetty-util/src/main/config/modules/slf4j-log4j.mod b/jetty-util/src/main/config/modules/slf4j-log4j.mod index 3faa5c56faa..e248480ec28 100644 --- a/jetty-util/src/main/config/modules/slf4j-log4j.mod +++ b/jetty-util/src/main/config/modules/slf4j-log4j.mod @@ -5,7 +5,7 @@ Provides a SLF4J to the Log4j v1.2 API logging bridge. logging log4j slf4j -verbose +internal [depend] slf4j-api diff --git a/jetty-util/src/main/config/modules/slf4j-log4j2.mod b/jetty-util/src/main/config/modules/slf4j-log4j2.mod index 19978f49615..445d38017f1 100644 --- a/jetty-util/src/main/config/modules/slf4j-log4j2.mod +++ b/jetty-util/src/main/config/modules/slf4j-log4j2.mod @@ -6,7 +6,7 @@ logging log4j2 log4j slf4j -verbose +internal [depend] slf4j-api diff --git a/jetty-util/src/main/config/modules/slf4j-logback.mod b/jetty-util/src/main/config/modules/slf4j-logback.mod index 48d1b062eff..6d33a89ced5 100644 --- a/jetty-util/src/main/config/modules/slf4j-logback.mod +++ b/jetty-util/src/main/config/modules/slf4j-logback.mod @@ -4,7 +4,7 @@ Provides a SLF4J to Logback logging bridge. [tags] logging slf4j -verbose +internal [depend] slf4j-api From 8248e187d92ac8ae98a4c601e276209d7965ffb9 Mon Sep 17 00:00:00 2001 From: WalkerWatch Date: Mon, 10 Oct 2016 12:28:34 -0400 Subject: [PATCH 4/5] Issue #984 - Minor edits to wording. Signed-off-by: WalkerWatch --- .../src/main/java/org/eclipse/jetty/start/BaseBuilder.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java b/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java index 9062044f177..bb399f99b20 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/BaseBuilder.java @@ -220,11 +220,11 @@ public class BaseBuilder else if (module.isTransitive()) { if (module.hasIniTemplate()) - StartLog.info("%-15s transitive, ini template available with --add-to-start=%s", + StartLog.info("%-15s transitively enabled, ini template available with --add-to-start=%s", module.getName(), module.getName()); else - StartLog.info("%-15s transitive",module.getName()); + StartLog.info("%-15s transitively enabled",module.getName()); } else StartLog.info("%-15s initialized in %s", From 6e19bddc2d3192516c08c88e846d0f1d254a1776 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Tue, 11 Oct 2016 17:59:38 +1100 Subject: [PATCH 5/5] Issue #993 --- .../src/main/config/etc/sessions/id-manager.xml | 13 ++++++++++++- .../server/session/DefaultSessionIdManager.java | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/jetty-server/src/main/config/etc/sessions/id-manager.xml b/jetty-server/src/main/config/etc/sessions/id-manager.xml index b31f690ae67..945d5076275 100644 --- a/jetty-server/src/main/config/etc/sessions/id-manager.xml +++ b/jetty-server/src/main/config/etc/sessions/id-manager.xml @@ -12,7 +12,18 @@ - node + + + node + + + 0 + + + + + + diff --git a/jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java b/jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java index ad9a1c15504..9ee4635e6aa 100644 --- a/jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java +++ b/jetty-server/src/main/java/org/eclipse/jetty/server/session/DefaultSessionIdManager.java @@ -336,9 +336,9 @@ public class DefaultSessionIdManager extends AbstractLifeCycle implements Sessio { String inst = System.getenv("JETTY_WORKER_INSTANCE"); _workerName = "node"+ (inst==null?"0":inst); - LOG.warn("No workerName configured for DefaultSessionIdManager, using {}",_workerName); } + LOG.info("DefaultSessionIdManager workerName={}",_workerName); _workerAttr=(_workerName!=null && _workerName.startsWith("$"))?_workerName.substring(1):null; if (_houseKeeper == null)