Merge branch 'jetty-9.3.x' into jetty-9.4.x

This commit is contained in:
Joakim Erdfelt 2016-06-28 13:47:54 -07:00
commit ac90d2b562
3 changed files with 42 additions and 5 deletions

View File

@ -39,8 +39,22 @@
<Call id="webappprovider" name="addAppProvider"> <Call id="webappprovider" name="addAppProvider">
<Arg> <Arg>
<New class="org.eclipse.jetty.deploy.providers.WebAppProvider"> <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
<Set name="monitoredDirName"><Property name="jetty.base" default="." />/<Property name="jetty.deploy.monitoredDir" deprecated="jetty.deploy.monitoredDirName" default="webapps"/></Set> <Set name="monitoredDirName">
<Set name="defaultsDescriptor"><Property name="jetty.home" default="." />/etc/webdefault.xml</Set> <Property>
<Name>jetty.deploy.monitoredPath</Name>
<Default>
<Property name="jetty.base" default="." />/<Property name="jetty.deploy.monitoredDir" deprecated="jetty.deploy.monitoredDirName" default="webapps"/>
</Default>
</Property>
</Set>
<Set name="defaultsDescriptor">
<Property>
<Name>jetty.deploy.defaultsDescriptorPath</Name>
<Default>
<Property name="jetty.home" default="." />/etc/webdefault.xml
</Default>
</Property>
</Set>
<Set name="scanInterval"><Property name="jetty.deploy.scanInterval" default="1"/></Set> <Set name="scanInterval"><Property name="jetty.deploy.scanInterval" default="1"/></Set>
<Set name="extractWars"><Property name="jetty.deploy.extractWars" default="true"/></Set> <Set name="extractWars"><Property name="jetty.deploy.extractWars" default="true"/></Set>
<Set name="configurationManager"> <Set name="configurationManager">

View File

@ -16,6 +16,12 @@ etc/jetty-deploy.xml
[ini-template] [ini-template]
# Monitored directory name (relative to $jetty.base) # Monitored directory name (relative to $jetty.base)
# jetty.deploy.monitoredDir=webapps # jetty.deploy.monitoredDir=webapps
# - OR -
# Monitored directory path (fully qualified)
# jetty.deploy.monitoredPath=/var/www/webapps
# Defaults Descriptor for all deployed webapps
# jetty.deploy.defaultsDescriptorPath=${jetty.base}/etc/webdefault.xml
# Monitored directory scan period (seconds) # Monitored directory scan period (seconds)
# jetty.deploy.scanInterval=1 # jetty.deploy.scanInterval=1

View File

@ -167,13 +167,18 @@ public class Log
return; return;
__initialized = true; __initialized = true;
Boolean announce = Boolean.parseBoolean(__props.getProperty("org.eclipse.jetty.util.log.announce", "true"));
try try
{ {
Class<?> log_class = __logClass==null?null:Loader.loadClass(__logClass); Class<?> log_class = __logClass==null?null:Loader.loadClass(__logClass);
if (LOG == null || (log_class!=null && !LOG.getClass().equals(log_class))) if (LOG == null || (log_class!=null && !LOG.getClass().equals(log_class)))
{ {
LOG = (Logger)log_class.newInstance(); LOG = (Logger)log_class.newInstance();
LOG.debug("Logging to {} via {}", LOG, log_class.getName()); if(announce)
{
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
}
} }
} }
catch(Throwable e) catch(Throwable e)
@ -182,8 +187,10 @@ public class Log
initStandardLogging(e); initStandardLogging(e);
} }
if (LOG!=null) if (announce && LOG!=null)
{
LOG.info(String.format("Logging initialized @%dms to %s",Uptime.getUptime(),LOG.getClass().getName())); LOG.info(String.format("Logging initialized @%dms to %s",Uptime.getUptime(),LOG.getClass().getName()));
}
} }
} }
@ -199,7 +206,12 @@ public class Log
{ {
log_class = StdErrLog.class; log_class = StdErrLog.class;
LOG = new StdErrLog(); LOG = new StdErrLog();
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
Boolean announce = Boolean.parseBoolean(__props.getProperty("org.eclipse.jetty.util.log.announce", "true"));
if(announce)
{
LOG.debug("Logging to {} via {}", LOG, log_class.getName());
}
} }
} }
@ -322,4 +334,9 @@ public class Log
{ {
return Collections.unmodifiableMap(__loggers); return Collections.unmodifiableMap(__loggers);
} }
public static Properties getProperties()
{
return __props;
}
} }