Merged branch 'jetty-9.4.x' into 'master'.

This commit is contained in:
Simone Bordet 2016-06-23 13:04:06 +02:00
commit 237502932a
6 changed files with 44 additions and 21 deletions

View File

@ -0,0 +1,8 @@
[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.
[depend]
jetty-slf4j
slf4j-log4j2

View File

@ -4,12 +4,13 @@ To receive jetty logs enable the jetty-slf4j, slf4j-log4j and log4j-log4j2 modul
[depends]
log4j2-api
resources
[provides]
log4j2-impl
[files]
basehome:modules/log4j2/log4j2.properties|resources/log4j2.properties
basehome:modules/log4j2/log4j2.xml|resources/log4j2.xml
maven://org.apache.logging.log4j/log4j-core/${log4j2.version}|lib/log4j/log4j-core-${log4j2.version}.jar
[lib]

View File

@ -1,11 +0,0 @@
status = error
name = PropertiesConfig
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = %m%n
rootLogger.level = info
rootLogger.appenderRef.stdout.ref = STDOUT

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="console" target="SYSTEM_ERR">
<PatternLayout pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n"/>
</Console>
</Appenders>
<Loggers>
<Root level="info" additivity="false">
<AppenderRef ref="console"/>
</Root>
</Loggers>
</Configuration>

View File

@ -0,0 +1,17 @@
[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.
[depend]
slf4j-api
log4j2-api
[provide]
slf4j-impl
[files]
maven://org.apache.logging.log4j/log4j-slf4j-impl/${log4j2.version}|lib/log4j/log4j-slf4j-impl-${log4j2.version}.jar
[lib]
lib/log4j/log4j-slf4j-impl-${log4j2.version}.jar

View File

@ -204,13 +204,13 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
{
/* TODO: provide annotation in future */
}
@Override
public void onPing(ByteBuffer buffer)
{
/* TODO: provide annotation in future */
}
@Override
public BatchMode getBatchMode()
{
@ -234,12 +234,6 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
throw t;
}
}
@Override
protected void doStop() throws Exception
{
session = null;
}
protected void terminateConnection(int statusCode, String rawreason)
{
@ -252,7 +246,7 @@ public abstract class AbstractEventDriver extends AbstractLifeCycle implements I
{
TARGET_LOG.warn("Unhandled Error (closing connection)",t);
onError(t);
if (t instanceof CloseException)
{
terminateConnection(((CloseException)t).getStatusCode(),t.getClass().getSimpleName());