diff --git a/jetty-server/src/main/config/modules/session-store-cache.mod b/jetty-server/src/main/config/modules/session-store-cache.mod index 182384066f4..2d62c82a8a1 100644 --- a/jetty-server/src/main/config/modules/session-store-cache.mod +++ b/jetty-server/src/main/config/modules/session-store-cache.mod @@ -15,7 +15,7 @@ etc/sessions/session-data-cache/session-caching-store.xml [ini] -session-data-cache=xmemcached +session-data-cache|=xmemcached [ini-template] diff --git a/jetty-server/src/main/config/modules/session-store-jdbc.mod b/jetty-server/src/main/config/modules/session-store-jdbc.mod index fd8edd96c5f..e12dadc47cf 100644 --- a/jetty-server/src/main/config/modules/session-store-jdbc.mod +++ b/jetty-server/src/main/config/modules/session-store-jdbc.mod @@ -15,7 +15,7 @@ sessions/jdbc/${db-connection-type} etc/sessions/jdbc/session-store.xml [ini] -db-connection-type=datasource +db-connection-type|=datasource [ini-template] ## 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 d961c6aefaa..e648719260d 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 @@ -50,11 +50,15 @@ public class Modules implements Iterable this._baseHome = basehome; this._args = args; - String java_version = System.getProperty("java.version"); - if (java_version!=null) + // Allow override mostly for testing + if (!args.getProperties().containsKey("java.version")) { - args.setProperty("java.version",java_version,"",false); - } + String java_version = System.getProperty("java.version"); + if (java_version!=null) + { + args.setProperty("java.version",java_version,""); + } + } } public void dump(List tags) @@ -279,14 +283,7 @@ public class Modules implements Iterable { // If the already enabled module is transitive and this enable is not if (p.isTransitive() && !transitive) - { p.clearTransitiveEnable(); - if (p.hasDefaultConfig()) - { - for (String a : p.getDefaultConfig()) - _args.removeProperty(a,p.getName()); - } - } else throw new UsageException("%s provides %s, which is already provided by %s enabled in %s",module.getName(),name,p.getName(),p.getEnableSources()); } @@ -307,7 +304,7 @@ public class Modules implements Iterable if (module.hasDefaultConfig()) { for(String line:module.getDefaultConfig()) - _args.parse(line,module.getName(),false); + _args.parse(line,module.getName()+"[ini]"); for (Module m:_modules) m.expandProperties(_args.getProperties()); } diff --git a/jetty-start/src/main/java/org/eclipse/jetty/start/Props.java b/jetty-start/src/main/java/org/eclipse/jetty/start/Props.java index cadfa1b8743..f770374d569 100644 --- a/jetty-start/src/main/java/org/eclipse/jetty/start/Props.java +++ b/jetty-start/src/main/java/org/eclipse/jetty/start/Props.java @@ -181,7 +181,8 @@ public final class Props implements Iterable public boolean containsKey(String key) { - return props.containsKey(key); + Prop prop = props.get(key); + return prop!=null && prop.value!=null; } public String expand(String str) @@ -381,17 +382,4 @@ public final class Props implements Iterable { return props.toString(); } - - public void remove(String key, String value, String source) - { - Prop prop = props.get(key); - - if (prop!=null && value.equals(prop.value) && source.equals(prop.origin)) - { - if (prop.overrides==null) - props.remove(key); - else - props.put(key,prop.overrides); - } - } } 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 47c78702f5e..c5b6ffff429 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 @@ -793,11 +793,6 @@ public class StartArgs } } - public void parse(final String rawarg, String source) - { - parse(rawarg,source,true); - } - /** * Parse a single line of argument. * @@ -805,17 +800,15 @@ public class StartArgs * the raw argument to parse * @param source * the origin of this line of argument - * @param replaceProps - * true if properties in this parse replace previous ones, false to not replace. */ - public void parse(final String rawarg, String source, boolean replaceProps) + public void parse(final String rawarg, String source) { if (rawarg == null) { return; } - StartLog.debug("parse(\"%s\", \"%s\", %b)",rawarg,source,replaceProps); + StartLog.debug("parse(\"%s\", \"%s\")",rawarg,source); final String arg = rawarg.trim(); @@ -1026,11 +1019,11 @@ public class StartArgs { case 2: System.setProperty(assign[0],assign[1]); - setProperty(assign[0],assign[1],source,replaceProps); + setProperty(assign[0],assign[1],source); break; case 1: System.setProperty(assign[0],""); - setProperty(assign[0],"",source,replaceProps); + setProperty(assign[0],"",source); break; default: break; @@ -1060,32 +1053,32 @@ public class StartArgs { key = key.substring(0,key.length()-1); String orig = getProperties().getString(key); - if (orig != null && !orig.isEmpty()) + if (orig == null || orig.isEmpty()) + { + if (value.startsWith(",")) + value=value.substring(1); + } + else { value=orig+value; source=propertySource.get(key)+","+source; } } - else if (key.endsWith(",")) + 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; - } + if (getProperties().containsKey(key)) + return; + } - else if (replaceProps) + else if (propertySource.containsKey(key)) { - if (propertySource.containsKey(key)) - { + if(!propertySource.get(key).endsWith("[ini]")) StartLog.warn("Property %s in %s already set in %s",key,source,propertySource.get(key)); - } propertySource.put(key,source); } - setProperty(key,value,source,replaceProps); + setProperty(key,value,source); return; } @@ -1166,7 +1159,7 @@ public class StartArgs this.allModules = allModules; } - public void setProperty(String key, String value, String source, boolean replaceProp) + public void setProperty(String key, String value, String source) { // Special / Prevent override from start.ini's if (key.equals("jetty.home")) @@ -1182,33 +1175,18 @@ public class StartArgs return; } - 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")) { - properties.setProperty(key,value,source); - if(key.equals("java.version")) - { - Version ver = new Version(value); + Version ver = new Version(value); - properties.setProperty("java.version",ver.toShortString(),source); - properties.setProperty("java.version.major",Integer.toString(ver.getLegacyMajor()),source); - properties.setProperty("java.version.minor",Integer.toString(ver.getMajor()),source); - properties.setProperty("java.version.revision",Integer.toString(ver.getRevision()),source); - properties.setProperty("java.version.update",Integer.toString(ver.getUpdate()),source); - } + properties.setProperty("java.version",ver.toShortString(),source); + properties.setProperty("java.version.major",Integer.toString(ver.getLegacyMajor()),source); + properties.setProperty("java.version.minor",Integer.toString(ver.getMajor()),source); + properties.setProperty("java.version.revision",Integer.toString(ver.getRevision()),source); + properties.setProperty("java.version.update",Integer.toString(ver.getUpdate()),source); } } - - public void removeProperty(String rawPropValue, String source) - { - int idx = rawPropValue.indexOf('='); - String key = rawPropValue.substring(0,idx); - String value = rawPropValue.substring(idx + 1); - - properties.remove(key,value,source); - } - public void setRun(boolean run) { 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 d810478e87a..78d8585be10 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 @@ -153,10 +153,13 @@ Properties: name+=value Add to an existing property. - - name,=value + + name+=,value Add to an existing property as a comma separated list. + name|=value + Set a property only if it is not already set. + 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.cmdline.txt b/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt index 759df59e929..d69afe74ea4 100644 --- a/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt +++ b/jetty-start/src/test/resources/usecases/basic-properties.cmdline.txt @@ -3,6 +3,6 @@ port=9090 add+=beginning add+=middle add+=end -list,=one -list,=two -list,=three +list+=,one +list+=,two +list+=,three diff --git a/jetty-util/src/main/config/etc/stderrout-logging.xml b/jetty-util/src/main/config/etc/stderrout-logging.xml index dc7fe9ed14f..82c050ac647 100644 --- a/jetty-util/src/main/config/etc/stderrout-logging.xml +++ b/jetty-util/src/main/config/etc/stderrout-logging.xml @@ -12,7 +12,7 @@ - /yyyy_mm_dd.stderrout.log + /yyyy_mm_dd.jetty.log diff --git a/jetty-util/src/main/config/modules/jcl-impl.mod b/jetty-util/src/main/config/modules/jcl-impl.mod index 6569c5c52e4..fbc31353e25 100644 --- a/jetty-util/src/main/config/modules/jcl-impl.mod +++ b/jetty-util/src/main/config/modules/jcl-impl.mod @@ -8,6 +8,7 @@ jcl internal [depends] +resources [provides] jcl-api @@ -15,9 +16,11 @@ jcl-impl [files] maven://commons-logging/commons-logging/${jcl.version}|lib/jcl/commons-logging-${jcl.version}.jar +basehome:modules/jcl/commons-logging.properties|resources/commons-logging.properties +logs/ [lib] -lib/jcl/commons-logging-${jcl.version}.jar +lib/jcl/*.jar [license] Log4j is released under the Apache 2.0 license. @@ -26,6 +29,3 @@ http://www.apache.org/licenses/LICENSE-2.0.html [ini] jcl.version=1.1.3 -[ini-template] -## After changing versions, run 'java -jar $JETTY_HOME/start.jar --create-files' -#jcl.version=1.1.3 diff --git a/jetty-util/src/main/config/modules/jcl/commons-logging.properties b/jetty-util/src/main/config/modules/jcl/commons-logging.properties new file mode 100644 index 00000000000..8cc45de2c72 --- /dev/null +++ b/jetty-util/src/main/config/modules/jcl/commons-logging.properties @@ -0,0 +1 @@ +org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog diff --git a/jetty-util/src/main/config/modules/jul-impl.mod b/jetty-util/src/main/config/modules/jul-impl.mod new file mode 100644 index 00000000000..eecbf0830cc --- /dev/null +++ b/jetty-util/src/main/config/modules/jul-impl.mod @@ -0,0 +1,22 @@ +[description] +Configures the Java Util Logging mechanism + +[tags] +logging +jul +internal + +[depends] +resources + +[provides] +jul-api +jul-impl + +[files] +basehome:modules/jul/java-util-logging.properties|etc/java-util-logging.properties +logs/ + +[exec] +-Djava.util.logging.config.file=etc/java-util-logging.properties + diff --git a/jetty-util/src/main/config/modules/jul/java-util-logging.properties b/jetty-util/src/main/config/modules/jul/java-util-logging.properties new file mode 100644 index 00000000000..53b6004e877 --- /dev/null +++ b/jetty-util/src/main/config/modules/jul/java-util-logging.properties @@ -0,0 +1,31 @@ +handlers = java.util.logging.FileHandler + +# Default global logging level. +# This specifies which kinds of events are logged across +# all loggers. For any given facility this global level +# can be overriden by a facility specific level +# Note that the ConsoleHandler also has a separate level +# setting to limit messages printed to the console. +.level = INFO + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +# default file output is in user's home directory. +java.util.logging.FileHandler.pattern = logs/jetty%u.log +java.util.logging.FileHandler.limit = 50000 +java.util.logging.FileHandler.count = 1 +java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter + +# Limit the message that are printed on the console to INFO and above. +java.util.logging.ConsoleHandler.level = INFO +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + +# Example to customize the SimpleFormatter output format +# to print one-line log message like this: +# : [] +# +# java.util.logging.SimpleFormatter.format=%4$s: %5$s [%1$tc]%n + diff --git a/jetty-util/src/main/config/modules/log4j-impl.mod b/jetty-util/src/main/config/modules/log4j-impl.mod index be7bd2c0249..c702271807a 100644 --- a/jetty-util/src/main/config/modules/log4j-impl.mod +++ b/jetty-util/src/main/config/modules/log4j-impl.mod @@ -17,9 +17,10 @@ log4j-impl [files] basehome:modules/log4j/log4j.properties|resources/log4j.properties maven://log4j/log4j/${log4j.version}|lib/log4j/log4j-${log4j.version}.jar +logs/ [lib] -lib/log4j/log4j-${log4j.version}.jar +lib/log4j/*.jar [license] Log4j is released under the Apache 2.0 license. @@ -28,6 +29,3 @@ http://www.apache.org/licenses/LICENSE-2.0.html [ini] log4j.version=1.2.17 -[ini-template] -## After changing versions, run 'java -jar $JETTY_HOME/start.jar --create-files' -#log4j.version=1.2.17 diff --git a/jetty-util/src/main/config/modules/log4j/log4j.properties b/jetty-util/src/main/config/modules/log4j/log4j.properties index 4a0a4a35674..3532816be5d 100644 --- a/jetty-util/src/main/config/modules/log4j/log4j.properties +++ b/jetty-util/src/main/config/modules/log4j/log4j.properties @@ -1,7 +1,18 @@ -log4j.rootLogger=INFO, stdout +log4j.rootLogger=INFO, file +#log4j.rootLogger=INFO, stderr + +log4j.appender.stderr.Target=System.err +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n + +# Direct log messages to a log file +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File=${jetty.base}/logs/jetty.log +log4j.appender.file.MaxFileSize=10MB +log4j.appender.file.MaxBackupIndex=10 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n diff --git a/jetty-util/src/main/config/modules/log4j2-api.mod b/jetty-util/src/main/config/modules/log4j2-api.mod index cd54e43e2b5..c0c676c1715 100644 --- a/jetty-util/src/main/config/modules/log4j2-api.mod +++ b/jetty-util/src/main/config/modules/log4j2-api.mod @@ -20,6 +20,3 @@ http://www.apache.org/licenses/LICENSE-2.0.html [ini] log4j2.version=2.6.1 -[ini-template] -## After changing versions, run 'java -jar $JETTY_HOME/start.jar --create-files' -#log4j2.version=2.6.1 diff --git a/jetty-util/src/main/config/modules/log4j2-impl.mod b/jetty-util/src/main/config/modules/log4j2-impl.mod index 767c40cee57..ab34b0f36b9 100644 --- a/jetty-util/src/main/config/modules/log4j2-impl.mod +++ b/jetty-util/src/main/config/modules/log4j2-impl.mod @@ -16,9 +16,10 @@ resources log4j2-impl [files] +maven://org.apache.logging.log4j/log4j-core/${log4j2.version}|lib/log4j2/log4j-core-${log4j2.version}.jar basehome:modules/log4j2/log4j2.xml|resources/log4j2.xml -maven://org.apache.logging.log4j/log4j-core/${log4j2.version}|lib/log4j/log4j-core-${log4j2.version}.jar +logs/ [lib] -lib/log4j/log4j-core-${log4j2.version}.jar +lib/log4j2/*.jar diff --git a/jetty-util/src/main/config/modules/log4j2/log4j2.xml b/jetty-util/src/main/config/modules/log4j2/log4j2.xml index 53321d4e3af..3c5703a29e0 100644 --- a/jetty-util/src/main/config/modules/log4j2/log4j2.xml +++ b/jetty-util/src/main/config/modules/log4j2/log4j2.xml @@ -1,14 +1,20 @@ - - - - - - - - - - - + + + + + %d %p %c{1.} [%t] %m%n + + + + + + + + + + + + diff --git a/jetty-util/src/main/config/modules/logback-impl.mod b/jetty-util/src/main/config/modules/logback-impl.mod index a6d3db96d36..0fe3409bdbb 100644 --- a/jetty-util/src/main/config/modules/logback-impl.mod +++ b/jetty-util/src/main/config/modules/logback-impl.mod @@ -6,11 +6,16 @@ and logback-access logging internal +[depends] +resources + [files] maven://ch.qos.logback/logback-core/${logback.version}|lib/logback/logback-core-${logback.version}.jar +basehome:modules/logback/logback.xml|resources/logback.xml +logs/ [lib] -lib/logback/logback-core-${logback.version}.jar +lib/logback/*.jar [license] Logback: the reliable, generic, fast and flexible logging framework. @@ -32,6 +37,3 @@ or (per the licensee's choosing) under [ini] logback.version=1.1.7 -[ini-template] -## After changing versions, run 'java -jar $JETTY_HOME/start.jar --create-files' -#logback.version=1.1.7 diff --git a/jetty-util/src/main/config/modules/logging-jcl.mod b/jetty-util/src/main/config/modules/logging-jcl.mod index 718affe557f..8318c5bdf30 100644 --- a/jetty-util/src/main/config/modules/logging-jcl.mod +++ b/jetty-util/src/main/config/modules/logging-jcl.mod @@ -15,6 +15,5 @@ logging [exec] -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog -[ini-template] -## Hide logging classes from deployed webapps +[ini] 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 index c7ad54ec27e..5cb3b055367 100644 --- a/jetty-util/src/main/config/modules/logging-jetty.mod +++ b/jetty-util/src/main/config/modules/logging-jetty.mod @@ -7,6 +7,7 @@ logging [depends] resources +stderrout-logging [provide] logging diff --git a/jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties b/jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties index f30a8967988..07e04350fed 100644 --- a/jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties +++ b/jetty-util/src/main/config/modules/logging-jetty/jetty-logging.properties @@ -1,8 +1,8 @@ -## Setup jetty logging implementation -org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog +## Force jetty logging implementation +#org.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -## Levels are ALL, DEBUG, INFO, WARN, OFF -org.eclipse.jetty.LEVEL=INFO +## Set logging levels from: ALL, DEBUG, INFO, WARN, OFF +#org.eclipse.jetty.LEVEL=INFO #com.example.LEVEL=INFO ## Hide stacks traces in logs? diff --git a/jetty-util/src/main/config/modules/logging-jul.mod b/jetty-util/src/main/config/modules/logging-jul.mod index 7c7323c8a90..579db975413 100644 --- a/jetty-util/src/main/config/modules/logging-jul.mod +++ b/jetty-util/src/main/config/modules/logging-jul.mod @@ -14,6 +14,5 @@ logging [exec] -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog -[ini-template] -## Hide logging classes from deployed webapps +[ini] 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 index ce81ca8ae23..7917bc405a3 100644 --- a/jetty-util/src/main/config/modules/logging-log4j.mod +++ b/jetty-util/src/main/config/modules/logging-log4j.mod @@ -15,6 +15,5 @@ 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/ +[ini] +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 index 81bbcf056df..805232a2e38 100644 --- a/jetty-util/src/main/config/modules/logging-log4j2.mod +++ b/jetty-util/src/main/config/modules/logging-log4j2.mod @@ -15,6 +15,5 @@ logging [exec] -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog -[ini-template] -## Hide logging classes from deployed webapps +[ini] 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 index 8223bce022a..02d5cf424a9 100644 --- a/jetty-util/src/main/config/modules/logging-logback.mod +++ b/jetty-util/src/main/config/modules/logging-logback.mod @@ -15,6 +15,5 @@ logging [exec] -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog -[ini-template] -## Hide logging classes from deployed webapps +[ini] 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 index 24b5f367cc7..214b4766cbe 100644 --- a/jetty-util/src/main/config/modules/logging-slf4j.mod +++ b/jetty-util/src/main/config/modules/logging-slf4j.mod @@ -14,6 +14,5 @@ logging [exec] -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.Slf4jLog -[ini-template] -## Hide logging classes from deployed webapps +[ini] jetty.webapp.addServerClasses,=file:${jetty.base}/lib/slf4j/ diff --git a/jetty-util/src/main/config/modules/logging/logging-classpath.xml b/jetty-util/src/main/config/modules/logging/logging-classpath.xml deleted file mode 100644 index 1f8e737e9bf..00000000000 --- a/jetty-util/src/main/config/modules/logging/logging-classpath.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jetty-util/src/main/config/modules/slf4j-api.mod b/jetty-util/src/main/config/modules/slf4j-api.mod index e2e787f8c4f..8247df7cc97 100644 --- a/jetty-util/src/main/config/modules/slf4j-api.mod +++ b/jetty-util/src/main/config/modules/slf4j-api.mod @@ -16,10 +16,6 @@ lib/slf4j/slf4j-api-${slf4j.version}.jar [ini] slf4j.version=1.7.21 -[ini-template] -## After changing versions, run 'java -jar $JETTY_HOME/start.jar --create-files' -#slf4j.version=1.7.21 - [license] SLF4J is distributed under the MIT License. Copyright (c) 2004-2013 QOS.ch diff --git a/jetty-util/src/main/config/modules/slf4j-impl.mod b/jetty-util/src/main/config/modules/slf4j-impl.mod index c44b8bd739c..20738e8d909 100644 --- a/jetty-util/src/main/config/modules/slf4j-impl.mod +++ b/jetty-util/src/main/config/modules/slf4j-impl.mod @@ -9,12 +9,15 @@ internal [depend] slf4j-api +resources [provide] slf4j-impl [files] maven://org.slf4j/slf4j-simple/${slf4j.version}|lib/slf4j/slf4j-simple-${slf4j.version}.jar +basehome:modules/slf4j/simplelogger.properties|resources/simplelogger.properties +logs/ [lib] -lib/slf4j/slf4j-simple-${slf4j.version}.jar +lib/slf4j/*.jar diff --git a/jetty-util/src/main/config/modules/slf4j/simplelogger.properties b/jetty-util/src/main/config/modules/slf4j/simplelogger.properties new file mode 100644 index 00000000000..d7f02258cb6 --- /dev/null +++ b/jetty-util/src/main/config/modules/slf4j/simplelogger.properties @@ -0,0 +1,6 @@ +org.slf4j.simpleLogger.logFile=logs/jetty.log +org.slf4j.simpleLogger.defaultLogLevel=info +org.slf4j.simpleLogger.showDateTime=true +org.slf4j.simpleLogger.showThreadName=true + +#org.slf4j.simpleLogger.log.org.eclipse.jetty=debug