diff --git a/logback-access/LICENSE.txt b/logback-access/LICENSE.txt
deleted file mode 100644
index af39fcb95d..0000000000
--- a/logback-access/LICENSE.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-Logback LICENSE
----------------
-
-Logback: the reliable, generic, fast and flexible logging framework.
-Copyright (C) 1999-2015, QOS.ch. All rights reserved.
-
-This program and the accompanying materials are dual-licensed under
-either the terms of the Eclipse Public License v1.0 as published by
-the Eclipse Foundation
-
- or (per the licensee's choosing)
-
-under the terms of the GNU Lesser General Public License version 2.1
-as published by the Free Software Foundation.
-
diff --git a/logback-access/build.xml b/logback-access/build.xml
deleted file mode 100644
index e7728ead92..0000000000
--- a/logback-access/build.xml
+++ /dev/null
@@ -1,90 +0,0 @@
-
keyword | -Label | -Jetty | -Resin | -Tomcat | -Observations | -
---|---|---|---|---|---|
a | -remote IP address | -NA | -NA | -request.getRemoteAddr() [S] | -RemoteIPAddressConverter | -
A | -local IP address | -- | - | InetAddress.getLocalHost().getHostAddress() [S] | -LocalIPAddressConverter | -
b | -Content length | -request.getConnection().getGenerator().getContentWritten(); | -Unless statusCode==304, response.getContentLength() | -response.getContentCount(); | -JettyContentLengthConverter, ResinContentLengthConverter | -
c | -Cookie | -request cookies (dumps all of them} | - -dumps cookies by name, request cookie first, if - unavailable then response cookie | - -request cookies, by name | -RequestCookieConverter | -
h | -remote IP addr | -request.getRemoteAddr() [S] | -request.printRemoteAddr, IP address string in textual presentation | -request.getRemoteHost() [S] | -RemoteHostConverter | -
H | -request protocol | -- | - | request.getProtocol() | -RequestProtocolConverter | -
i | -Incoming header | -NA | -request.getHeader(name) [S] | -request.getHeader(header) [S] | -RequestHeaderConverter | -
l | -Remote logical username from identd | -always '-' | -always '-' | -always '-' | -NAConverter | -
n | -attribute in the ServletRequest | -NA | -request.getAttribute(name) [S] | -NA | -RequestAttributeConverter, in tomcat %r is used | -
o | -response header | -- | response.getHeader(name) [NS] | -- | not implemented although response.setHeader() method is available | -
r | -First line of the request (method and request URI) | -request.getMethod()+ request.getUri() [NS] +request.getProtocol() | -request.getMethod() + request.getUriBuffer() [NS] + request.getProtocol() | -request.getMethod() + request.getRequestURI() + request.getQueryString() + '?' + request.getProtocol(); | -RequestURLConverter | -
{}r | -attribute in the ServletRequest | -NA | -NA | -request.getAttribute(name) [S] | -RequestAttributeConverter, in resin %n is used | -
s | -status code | -response.getStatus() [NS] | -response.getStatusCode() [NS] | -response.getStatus() [NS] | -surprisingly, not in the Servlet API | -
{}t | -request time stamp | -getTimeStamp() [NS] | -based on current time | -based on current time | -DateConverter | -
T | -request processing duration in seconds | -NA | -request.getStartTime() - Alarm.getExactTime() | -Valve measures invocation time | -- |
D | -request processing duration in millis | -- | request.getStartTime() - Alarm.getExactTime() | -Valve measures invocation time | -- |
u | -remote user | -request.getRemoteUser() [S] | -request.getRemoteUser() [S] | -request.getRemoteUser() [S] | -RemoteUserConverter | -
U | -Requested URI path | -NA | -request.getRequestURI() [S} | -request.getRequestURI() [S} | -RequestURIConverter | -
- * This class is a module-specific implementation of
- * {@link ch.qos.logback.access.PatternLayout} to allow http-specific patterns
- * to be used. The ch.qos.logback.access.PatternLayout
provides a
- * way to format the logging output that is just as easy and flexible as the
- * usual PatternLayout
.
- *
- * The content of the table columns are specified using a conversion pattern. - * See {@link ch.qos.logback.access.PatternLayout} for documentation on the - * available patterns. - *
- * For more information about this layout, please refer to the online manual at
- * http://logback.qos.ch/manual/layouts.html#AccessHTMLLayout
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class HTMLLayout extends HTMLLayoutBase Contains classes to format log output in HTML.
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.jetty;
-
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-import ch.qos.logback.access.spi.ServerAdapter;
-import org.eclipse.jetty.http.HttpField;
-import org.eclipse.jetty.server.Request;
-import org.eclipse.jetty.server.Response;
-
-/**
- * A Jetty 9.4.x and 10.0.x specific implementation of the {@link ServerAdapter} interface.
- *
- * @author Sébastien Pennec
- * @author Ceki Gulcu
- * @author Joakim Erdfelt
- */
-public class JettyModernServerAdapter extends JettyServerAdapter {
-
-
- public JettyModernServerAdapter(Request jettyRequest, Response jettyResponse) {
- super(jettyRequest, jettyResponse);
- }
-
- @Override
- public long getContentLength() {
- return response.getHttpChannel().getBytesWritten();
- }
-
- @Override
- public int getStatusCode() {
- return response.getCommittedMetaData().getStatus();
- }
-
- @Override
- public long getRequestTimestamp() {
- return request.getTimeStamp();
- }
-
- @Override
- public Map
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.jetty;
-
-import java.io.File;
-import java.net.URL;
-import java.util.EventListener;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import ch.qos.logback.access.joran.JoranConfigurator;
-import ch.qos.logback.access.spi.AccessEvent;
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.Appender;
-import ch.qos.logback.core.ContextBase;
-import ch.qos.logback.core.CoreConstants;
-import ch.qos.logback.core.boolex.EventEvaluator;
-import ch.qos.logback.core.filter.Filter;
-import ch.qos.logback.core.joran.spi.JoranException;
-import ch.qos.logback.core.spi.AppenderAttachable;
-import ch.qos.logback.core.spi.AppenderAttachableImpl;
-import ch.qos.logback.core.spi.FilterAttachable;
-import ch.qos.logback.core.spi.FilterAttachableImpl;
-import ch.qos.logback.core.spi.FilterReply;
-import ch.qos.logback.core.status.ErrorStatus;
-import ch.qos.logback.core.status.InfoStatus;
-import ch.qos.logback.core.util.EnvUtil;
-import ch.qos.logback.core.util.FileUtil;
-import ch.qos.logback.core.util.OptionHelper;
-import ch.qos.logback.core.util.StatusPrinter;
-import org.eclipse.jetty.server.Request;
-import org.eclipse.jetty.server.RequestLog;
-import org.eclipse.jetty.server.Response;
-import org.eclipse.jetty.util.component.LifeCycle;
-
-/**
- * This class is logback's implementation of jetty's RequestLog interface.
- *
- * It can be seen as logback classic's LoggerContext. Appenders can be attached
- * directly to RequestLogImpl and RequestLogImpl uses the same StatusManager as
- * LoggerContext does. It also provides containers for properties.
- *
- *
- * This {@code RequestLogImpl} only supports Jetty 7.0.0 through Jetty 10.
- * If you are using Jetty 11 with the new Jakarta Servlets (namespace {@code jakarta.servlet})
- * then you will need a more modern version of {@code logback-access}.
- *
- * Jetty 9.4.x and Jetty 10.x use a modern {@code org.eclipse.jetty.server.Server.setRequestLog(RequestLog)}
- * interface that is based on a Server level RequestLog behavior. This means all requests are logged,
- * even bad requests, and context-less requests.
- *
- * The internals of the Jetty Request and Response objects track the state of the object at the time
- * they are committed (the actual state during the application when an action on the network commits the
- * request/response exchange). This prevents behaviors from 3rd party libraries
- * that change the state of the request / response before the RequestLog gets a chance
- * to log the details. This differs from Jetty 9.3.x and
- * older in that those versions used a (now deprecated) {@code RequestLogHandler} and
- * would never see bad requests, or context-less requests,
- * and if a 3rd party library modifies the the response (for example by setting
- * {@code response.setStatus(200)} after the response has been initiated on the network)
- * this change in status would be logged, instead of the actual status that was sent.
- *
- * First, you must be using the proper {@code ${jetty.home}} and {@code ${jetty.base}}
- * directory split. Configure your {@code ${jetty.base}} with at least the `resources` module
- * enabled (so that your configuration can be found).
- *
- * Next, create a {@code ${jetty.base}/etc/logback-access.xml} file with the following
- * content.
- *
- * Now you'll need a {@code ${jetty.base}/resources/logback-access.xml} configuration file.
- *
- * By default, {@code RequestLogImpl} looks for a logback configuration file called
- * {@code etc/logback-access.xml}, in the {@code ${jetty.base}} directory, then
- * the older {@code ${jetty.home}} directory.
- *
- * The {@code logback-access.xml} file is slightly
- * different than the usual logback classic configuration file. Most of it is
- * the same: {@link Appender Appenders} and {@link ch.qos.logback.core.Layout layouts}
- * are declared the exact same way. However,
- * loggers elements are not allowed.
- * It is possible to place the logback configuration file anywhere, as long as it's path is specified.
- * Here is another example, with an arbitrary path to the logback-access.xml file.
- *
- * To configure these older Jetty instances to use {@code RequestLogImpl},
- * the use of the {@code RequestLogHandler} is the technique available to you.
- * Modify your {@code etc/jetty-requestlog.xml}
- * By default, RequestLogImpl looks for a logback configuration file called
- * logback-access.xml, in the same folder where jetty.xml is located, that is
- * etc/logback-access.xml. The logback-access.xml file is slightly
- * different from the usual logback classic configuration file. Most of it is
- * the same: Appenders and Layouts are declared the exact same way. However,
- * loggers elements are not allowed.
- *
- * It is possible to put the logback configuration file anywhere, as long as
- * it's path is specified. Here is another example, with a path to the
- * logback-access.xml file.
- *
- * Next is a sample logback-access.xml file printing access events on the console.
- *
- * Here is another configuration file, using SMTPAppender:
- * This is logback access' implementation for Jetty 8. Will also use links from super class. Contains the Joran configuration classes
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- *
- */
-public class SMTPAppender extends SMTPAppenderBase
- * For more information on this appender, please refer to the online manual at
- * http://logback.qos.ch/manual/appenders.html#SSLSocketAppender
- *
- * @author Carl Harris
- */
-public class SSLSocketAppender extends AbstractSSLSocketAppender
- * For example, the socket node might decide to log events to a local file and
- * also resent them to a second socket node.
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- *
- * @since 0.8.4
- */
-public class SocketNode implements Runnable {
-
- Socket socket;
- AccessContext context;
- HardenedAccessEventInputStream hardenedOIS;
-
- public SocketNode(Socket socket, AccessContext context) {
- this.socket = socket;
- this.context = context;
- try {
- hardenedOIS = new HardenedAccessEventInputStream(new BufferedInputStream(socket.getInputStream()));
- } catch (Exception e) {
- System.out.println("Could not open HardenedObjectInputStream to " + socket + e);
- }
- }
-
- @Override
- public void run() {
- IAccessEvent event;
-
- try {
- while (true) {
- // read an event from the wire
- event = (IAccessEvent) hardenedOIS.readObject();
- // check that the event should be logged
- if (context.getFilterChainDecision(event) == FilterReply.DENY) {
- break;
- }
- // send it to the appenders
- context.callAppenders(event);
- }
- } catch (java.io.EOFException e) {
- System.out.println("Caught java.io.EOFException closing connection.");
- } catch (java.net.SocketException e) {
- System.out.println("Caught java.net.SocketException closing connection.");
- } catch (IOException e) {
- System.out.println("Caught java.io.IOException: " + e);
- System.out.println("Closing connection.");
- } catch (Exception e) {
- System.out.println("Unexpected exception. Closing connection." + e);
- }
-
- try {
- hardenedOIS.close();
- } catch (Exception e) {
- System.out.println("Could not close connection." + e);
- }
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/net/URLEvaluator.java b/logback-access/src/main/java/ch/qos/logback/access/net/URLEvaluator.java
deleted file mode 100644
index 9abdb9b569..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/net/URLEvaluator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.net;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.boolex.EvaluationException;
-import ch.qos.logback.core.boolex.EventEvaluator;
-import ch.qos.logback.core.spi.ContextAwareBase;
-import ch.qos.logback.core.spi.LifeCycle;
-
-public class URLEvaluator extends ContextAwareBase implements EventEvaluator Provides a robust appender that serves logging events to remote clients The This is logback access' main package.
- * It has been removed from the {@link ch.qos.logback.access.PatternLayout}
- * since it needs further testing before wide use.
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class FullRequestConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent ae) {
- StringBuilder buf = new StringBuilder();
- buf.append(ae.getRequestURL());
- buf.append(CoreConstants.LINE_SEPARATOR);
-
- Enumeration
- * It has been removed from the {@link ch.qos.logback.access.PatternLayout}
- * since it needs further testing before wide use.
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class RequestContentConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getRequestContent();
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestCookieConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestCookieConverter.java
deleted file mode 100644
index ef9eb5648d..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestCookieConverter.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.util.OptionHelper;
-
-public class RequestCookieConverter extends AccessConverter {
-
- String key;
-
- @Override
- public void start() {
- key = getFirstOption();
- if (OptionHelper.isNullOrEmpty(key)) {
- addWarn("Missing key for the requested header");
- } else {
- super.start();
- }
- }
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- if (!isStarted()) {
- return "INACTIVE_COOKIE_CONVERTER";
- }
-
- return accessEvent.getCookie(key);
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestHeaderConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestHeaderConverter.java
deleted file mode 100644
index 1bd5bca3a4..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestHeaderConverter.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.util.OptionHelper;
-
-public class RequestHeaderConverter extends AccessConverter {
-
- String key;
-
- @Override
- public void start() {
- key = getFirstOption();
- if (OptionHelper.isNullOrEmpty(key)) {
- addWarn("Missing key for the requested header. Defaulting to all keys.");
- key = null;
- }
- super.start();
- }
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- if (!isStarted()) {
- return "INACTIVE_HEADER_CONV";
- }
-
- if (key != null) {
- return accessEvent.getRequestHeader(key);
- } else {
- return accessEvent.getRequestHeaderMap().toString();
- }
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestMethodConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestMethodConverter.java
deleted file mode 100644
index 51b9a82b03..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestMethodConverter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class RequestMethodConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getMethod();
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestParameterConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestParameterConverter.java
deleted file mode 100644
index ec621b5b90..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestParameterConverter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import java.util.Arrays;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.util.OptionHelper;
-
-public class RequestParameterConverter extends AccessConverter {
-
- String key;
-
- @Override
- public void start() {
- key = getFirstOption();
- if (OptionHelper.isNullOrEmpty(key)) {
- addWarn("Missing key for the request parameter");
- } else {
- super.start();
- }
- }
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- if (!isStarted()) {
- return "INACTIVE_REQUEST_PARAM_CONV";
- }
-
- String[] paramArray = accessEvent.getRequestParameter(key);
- if (paramArray.length == 1) {
- return paramArray[0];
- } else {
- // for an array string {"a", "b"} named 'sa', Array.toString(sa) returns the
- // string
- // "[a, b]".
- return Arrays.toString(paramArray);
- }
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestProtocolConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestProtocolConverter.java
deleted file mode 100644
index a20f7878b3..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestProtocolConverter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class RequestProtocolConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getProtocol();
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURIConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURIConverter.java
deleted file mode 100644
index 7f8cebce05..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURIConverter.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-/**
- * The request URI.
- *
- * @author Ceki Gülcü
- */
-public class RequestURIConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getRequestURI();
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURLConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURLConverter.java
deleted file mode 100644
index fd50d7d4a9..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/RequestURLConverter.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-/**
- * The first line of the request.
- *
- * @author Ceki Gülcü
- */
-public class RequestURLConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getRequestURL();
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseContentConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseContentConverter.java
deleted file mode 100644
index 9e5ae54fcb..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseContentConverter.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-/**
- * This class is tied to the
- * It has been removed from the {@link ch.qos.logback.access.PatternLayout}
- * since it needs further testing before wide use.
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class ResponseContentConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getResponseContent();
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseHeaderConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseHeaderConverter.java
deleted file mode 100644
index 6d4becc384..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/ResponseHeaderConverter.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.util.OptionHelper;
-
-public class ResponseHeaderConverter extends AccessConverter {
-
- String key;
-
- @Override
- public void start() {
- key = getFirstOption();
- if (OptionHelper.isNullOrEmpty(key)) {
- addWarn("Missing key for the response header");
- } else {
- super.start();
- }
- }
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- if (!isStarted()) {
- return "INACTIVE_REPONSE_HEADER_CONV";
- }
-
- return accessEvent.getResponseHeader(key);
- // return null;
-
- // HttpServletResponse response = accessEvent.getHttpResponse();
- //
- // Object value = null; // = response.getHeader(key);
- // if (value == null) {
- // return AccessConverter.NA;
- // } else {
- // return value.toString();
- // }
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/ServerNameConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/ServerNameConverter.java
deleted file mode 100644
index 086e8179a6..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/ServerNameConverter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class ServerNameConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getServerName();
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/SessionIDConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/SessionIDConverter.java
deleted file mode 100644
index 92e80083b4..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/SessionIDConverter.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2013, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class SessionIDConverter extends AccessConverter {
-
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getSessionID();
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/StatusCodeConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/StatusCodeConverter.java
deleted file mode 100644
index d19807415d..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/StatusCodeConverter.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class StatusCodeConverter extends AccessConverter {
-
- @Override
- public String convert(IAccessEvent accessEvent) {
- return Integer.toString(accessEvent.getStatusCode());
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/ThreadNameConverter.java b/logback-access/src/main/java/ch/qos/logback/access/pattern/ThreadNameConverter.java
deleted file mode 100644
index 7c9520993c..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/ThreadNameConverter.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2013, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.pattern;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-
-public class ThreadNameConverter extends AccessConverter {
-
- public String convert(IAccessEvent accessEvent) {
- return accessEvent.getThreadName();
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/pattern/package.html b/logback-access/src/main/java/ch/qos/logback/access/pattern/package.html
deleted file mode 100644
index 5e4898f941..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/pattern/package.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- Provides classes implementing format specifiers in conversion patterns. The field is specified via the {@link FieldName} property.
- *
- * @author Ceki Gülcü
- *
- */
-public class AccessEventDiscriminator extends AbstractDiscriminator The first three fields require an additional key. For the
- * SESSION_ATTRIBUTE field, the additional key named "id" has special meaning
- * as it is mapped to the session id of the current http request.
- */
- public enum FieldName {
- COOKIE, REQUEST_ATTRIBUTE, SESSION_ATTRIBUTE, REMOTE_ADDRESS, LOCAL_PORT, REQUEST_URI
- }
-
- String defaultValue;
- String key;
- FieldName fieldName;
- String additionalKey;
-
- @Override
- public String getDiscriminatingValue(IAccessEvent acccessEvent) {
- String rawValue = getRawDiscriminatingValue(acccessEvent);
- if (rawValue == null || rawValue.length() == 0) {
- return defaultValue;
- } else {
- return rawValue;
- }
- }
-
- public String getRawDiscriminatingValue(IAccessEvent acccessEvent) {
- switch (fieldName) {
- case COOKIE:
- // tested
- return acccessEvent.getCookie(additionalKey);
- case LOCAL_PORT:
- return String.valueOf(acccessEvent.getLocalPort());
- case REQUEST_ATTRIBUTE:
- // tested
- return getRequestAttribute(acccessEvent);
- case SESSION_ATTRIBUTE:
- return getSessionAttribute(acccessEvent);
- case REMOTE_ADDRESS:
- return acccessEvent.getRemoteAddr();
- case REQUEST_URI:
- // tested
- return getRequestURI(acccessEvent);
- default:
- return null;
- }
- }
-
- private String getRequestAttribute(IAccessEvent acccessEvent) {
- String attr = acccessEvent.getAttribute(additionalKey);
- if (IAccessEvent.NA.equals(attr)) {
- return null;
- } else {
- return attr;
- }
- }
-
- private String getRequestURI(IAccessEvent acccessEvent) {
- String uri = acccessEvent.getRequestURI();
- if (uri != null && uri.length() >= 1 && uri.charAt(0) == '/') {
- return uri.substring(1);
- } else {
- return uri;
- }
- }
-
- private String getSessionAttribute(IAccessEvent acccessEvent) {
- HttpServletRequest req = acccessEvent.getRequest();
- if (req != null) {
- HttpSession session = req.getSession(false);
- if (session != null) {
- if ("id".equalsIgnoreCase(additionalKey)) {
- return session.getId();
- } else {
- Object v = session.getAttribute(additionalKey);
- if (v != null) {
- return v.toString();
- }
- }
- }
- }
- return null;
- }
-
- @Override
- public void start() {
-
- int errorCount = 0;
-
- if (defaultValue == null) {
- addError("\"DefaultValue\" property must be set.");
- }
- if (fieldName == null) {
- addError("\"FieldName\" property must be set.");
- errorCount++;
- }
-
- switch (fieldName) {
- case SESSION_ATTRIBUTE:
- case REQUEST_ATTRIBUTE:
- case COOKIE:
- if (additionalKey == null) {
- addError("\"OptionalKey\" property is mandatory for field name " + fieldName.toString());
- errorCount++;
- }
- }
-
- if (errorCount == 0) {
- started = true;
- }
- }
-
- public void setFieldName(FieldName fieldName) {
- this.fieldName = fieldName;
- }
-
- public FieldName getFieldName() {
- return fieldName;
- }
-
- public String getAdditionalKey() {
- return additionalKey;
- }
-
- public void setAdditionalKey(String additionalKey) {
- this.additionalKey = additionalKey;
- }
-
- /**
- * @see #setDefaultValue(String)
- * @return
- */
- public String getDefaultValue() {
- return defaultValue;
- }
-
- /**
- * The default value returned by this discriminator in case it cannot compute
- * the discriminating value from the access event.
- *
- * @param defaultValue
- */
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public String getKey() {
- return key;
- }
-
- public void setKey(String key) {
- this.key = key;
- }
-
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/sift/SiftingAppender.java b/logback-access/src/main/java/ch/qos/logback/access/sift/SiftingAppender.java
deleted file mode 100644
index ddc43bacb8..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/sift/SiftingAppender.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.sift;
-
-import ch.qos.logback.access.spi.IAccessEvent;
-import ch.qos.logback.core.joran.spi.DefaultClass;
-import ch.qos.logback.core.sift.Discriminator;
-import ch.qos.logback.core.sift.SiftingAppenderBase;
-
-/**
- * This appender can contain other appenders which it can build dynamically
- * depending on MDC values. The built appender is specified as part of a
- * configuration file.
- *
- * See the logback manual for further details.
- *
- *
- * @author Ceki Gulcu
- */
-public class SiftingAppender extends SiftingAppenderBase
- * Sequence numbers, if present, should be increasing monotonically.
- *
- * @since 1.3.0
- */
-
- long getSequenceNumber();
-
- /**
- * The time elapsed between receiving the request and logging it in
- * milliseconds.
- */
- long getElapsedTime();
-
- /**
- * The number of seconds elapsed between receiving the request and logging it.
- */
- long getElapsedSeconds();
-
- String getRequestURI();
-
- /**
- * The first line of the request.
- */
- String getRequestURL();
-
- String getRemoteHost();
-
- String getRemoteUser();
-
- String getProtocol();
-
- String getMethod();
-
- String getServerName();
-
- String getSessionID();
-
- void setThreadName(String threadName);
-
- String getThreadName();
-
- String getQueryString();
-
- String getRemoteAddr();
-
- String getRequestHeader(String key);
-
- Enumeration Contains the core classes of logback access.
- * For more information on using LogbackValve please refer to the online
- * documentation on
- * logback-access and
- * tomcat.
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class LogbackValve extends ValveBase
- implements Lifecycle, Context, AppenderAttachable This is logback access' implementation for Tomcat.");
- } else {
- buf.append(" even\">");
- }
- buf.append(LINE_SEPARATOR);
-
- Converter ");
- buf.append(LINE_SEPARATOR);
-
- return buf.toString();
- }
-
- private void appendEventToBuffer(StringBuilder buf, Converter");
- c.write(buf, event);
- buf.append(" ");
- buf.append(LINE_SEPARATOR);
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/html/UrlCssBuilder.java b/logback-access/src/main/java/ch/qos/logback/access/html/UrlCssBuilder.java
deleted file mode 100644
index 87c8ce8509..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/html/UrlCssBuilder.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-package ch.qos.logback.access.html;
-
-import ch.qos.logback.core.html.CssBuilder;
-
-/**
- * This class helps the HTMLLayout build the CSS link. It either provides the
- * HTMLLayout with a default css file, or builds the link to an external,
- * user-specified, file.
- *
- * @author Sébastien Pennec
- */
-public class UrlCssBuilder implements CssBuilder {
-
- String url = "http://logback.qos.ch/css/access.css";
-
- public String getUrl() {
- return url;
- }
-
- public void setUrl(String url) {
- this.url = url;
- }
-
- @Override
- public void addCss(StringBuilder sbuf) {
- sbuf.append("");
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/html/package.html b/logback-access/src/main/java/ch/qos/logback/access/html/package.html
deleted file mode 100644
index c988c3f19e..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/html/package.html
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Supported Jetty Versions
- * Configuring for Jetty 9.4.x through to Jetty 10.0.x
- *
- * <?xml version="1.0"?>
- * <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
- *
- * <Configure id="Server" class="org.eclipse.jetty.server.Server">
- * <Set name="requestLog">
- * <New id="LogbackAccess" class="ch.qos.logback.access.jetty.RequestLogImpl">
- * <Set name="resource">logback-access.xml</Set>
- * </New>
- * </Set>
- * </Configure>
- *
- *
- * <?xml version="1.0"?>
- * <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
- *
- * <Configure id="Server" class="org.eclipse.jetty.server.Server">
- * <Set name="requestLog">
- * <New id="LogbackAccess" class="ch.qos.logback.access.jetty.RequestLogImpl">
- * <Set name="fileName">/arbitrary/path/to/logback-access.xml</Set>
- * </New>
- * </Set>
- * </Configure>
- *
- * Configuring for Jetty 7.x thru to Jetty 9.3.x
- *
- * <?xml version="1.0"?>
- * <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
- *
- * <Configure id="Server" class="org.eclipse.jetty.server.Server">
- * <Ref id="Handlers">
- * <Call name="addHandler">
- * <Arg>
- * <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
- * <Set name="requestLog">
- * <New id="RequestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl"/>
- * </Set>
- * </New>
- * </Arg>
- * </Call>
- * </Ref>
- * </Configure>
- *
- *
- *
- * <?xml version="1.0"?>
- * <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
- *
- * <Configure id="Server" class="org.eclipse.jetty.server.Server">
- * <Ref id="Handlers">
- * <Call name="addHandler">
- * <Arg>
- * <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
- * <Set name="requestLog">
- * <New id="RequestLogImpl" class="ch.qos.logback.access.jetty.RequestLogImpl">
- * <Set name="fileName">path/to/logback-access.xml</Set>
- * </New>
- * </Set>
- * </New>
- * </Arg>
- * </Call>
- * </Ref>
- * </Configure>
- *
- *
- * <configuration>
- * <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
- * <layout class="ch.qos.logback.access.PatternLayout">
- * <param name="Pattern" value="%date %server %remoteIP %clientHost %user %requestURL" />
- * </layout>
- * </appender>
- *
- * <appender-ref ref="STDOUT" />
- * </configuration>
- *
- *
- * <configuration>
- * <appender name="SMTP" class="ch.qos.logback.access.net.SMTPAppender">
- * <layout class="ch.qos.logback.access.PatternLayout">
- * <param name="pattern" value="%remoteIP [%date] %requestURL %statusCode %bytesSent" />
- * </layout>
- * <param name="From" value="sender@domaine.org" />
- * <param name="SMTPHost" value="mail.domain.org" />
- * <param name="Subject" value="Last Event: %statusCode %requestURL" />
- * <param name="To" value="server_admin@domain.org" />
- * </appender>
- * <appender-ref ref="SMTP" />
- * </configuration>
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- * @author Joakim Erdfelt
- */
-public class RequestLogImpl extends ContextBase implements org.eclipse.jetty.util.component.LifeCycle, RequestLog, AppenderAttachableevaluator
passed as parameter as the {@link EventEvaluator}
- * for this SMTPAppender.
- */
- public SMTPAppender(EventEvaluator
- * <b>Usage:</b> java ch.qos.logback.access.net.SimpleSocketServer port configFile
- *
- * where
- *
- * port
- *
- * is a part number where the server listens and
- *
- * configFile
- *
- * is an xml configuration file fed to {@link JoranConfigurator}.
- *
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- *
- * @since 0.8.4
- */
-public class SimpleSocketServer {
-
- static int port;
-
- private static AccessContext basicContext;
-
- public static void main(String argv[]) throws Exception {
- if (argv.length == 2) {
- init(argv[0], argv[1]);
- } else {
- usage("Wrong number of arguments.");
- }
-
- runServer();
- }
-
- static void runServer() {
- try {
- System.out.println("Listening on port " + port);
- @SuppressWarnings("resource")
- ServerSocket serverSocket = new ServerSocket(port);
- while (true) {
- System.out.println("Waiting to accept a new client.");
- Socket socket = serverSocket.accept();
- System.out.println("Connected to client at " + socket.getInetAddress());
- System.out.println("Starting new socket node.");
- new Thread(new SocketNode(socket, basicContext)).start();
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- static void usage(String msg) {
- System.err.println(msg);
- System.err.println("Usage: java " + SimpleSocketServer.class.getName() + " port configFile");
- System.exit(1);
- }
-
- static void init(String portStr, String configFile) throws JoranException {
- try {
- port = Integer.parseInt(portStr);
- } catch (java.lang.NumberFormatException e) {
- e.printStackTrace();
- usage("Could not interpret port number [" + portStr + "].");
- }
-
- basicContext = new AccessContext();
- if (configFile.endsWith(".xml")) {
- JoranConfigurator configurator = new JoranConfigurator();
- configurator.setContext(basicContext);
- configurator.doConfigure(configFile);
- StatusPrinter.print(basicContext);
- }
- }
-}
diff --git a/logback-access/src/main/java/ch/qos/logback/access/net/SocketAppender.java b/logback-access/src/main/java/ch/qos/logback/access/net/SocketAppender.java
deleted file mode 100644
index 38bed9cc72..0000000000
--- a/logback-access/src/main/java/ch/qos/logback/access/net/SocketAppender.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/**
- * Logback: the reliable, generic, fast and flexible logging framework.
- * Copyright (C) 1999-2015, QOS.ch. All rights reserved.
- *
- * This program and the accompanying materials are dual-licensed under
- * either the terms of the Eclipse Public License v1.0 as published by
- * the Eclipse Foundation
- *
- * or (per the licensee's choosing)
- *
- * under the terms of the GNU Lesser General Public License version 2.1
- * as published by the Free Software Foundation.
- */
-// Contributors: Dan MacDonald ServerSocketAppender
- listens on a configurable TCP port for connections from remote
- loggers. Events that are delivered to the appender are serialized
- and sent to each connected remote logger.
- fullRequest
conversion word.
- * requestContent
conversion word.
- * requestContent
conversion word.
- * AccessEvent
instance is created. This instance is passed around
- * to the different logback components.
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- */
-public class AccessEvent implements Serializable, IAccessEvent {
-
- private static final String[] NA_STRING_ARRAY = new String[] { NA };
-
- private static final long serialVersionUID = 866718993618836343L;
-
- private static final String EMPTY = "";
-
- private transient final HttpServletRequest httpRequest;
- private transient final HttpServletResponse httpResponse;
-
- String queryString;
- String requestURI;
- String requestURL;
- String remoteHost;
- String remoteUser;
- String remoteAddr;
- String threadName;
- String protocol;
- String method;
- String serverName;
- String requestContent;
- String responseContent;
- String sessionID;
- long elapsedTime;
-
- MapAccessEvent
instance is created. This instance is passed around
- * to the different logback components.
- *
- * @author Ceki Gülcü
- * @author Sébastien Pennec
- * @author Jörn Huxhorn
- */
-public interface IAccessEvent extends DeferredProcessingAware {
-
- String NA = "-";
- int SENTINEL = -1;
-
- /**
- * Returns the underlying HttpServletRequest. After serialization the returned
- * value will be null.
- *
- * @return
- */
- HttpServletRequest getRequest();
-
- /**
- * Returns the underlying HttpServletResponse. After serialization the returned
- * value will be null.
- *
- * @return
- */
- HttpServletResponse getResponse();
-
- /**
- * The number of milliseconds elapsed from 1/1/1970 until logging event was
- * created.
- */
- long getTimeStamp();
-
- /**
- * The sequence number associated with this event.
- *
- *