Author: ggregory
Date: Wed Jan 15 18:16:23 2014
New Revision: 1558492
URL: http://svn.apache.org/r1558492
Log:
Sort members in AB order.
Modified:
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java
Modified:
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java
URL:
http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java?rev=1558492&r1=1558491&r2=1558492&view=diff
==============================================================================
---
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java
(original)
+++
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/LogEvent.java
Wed Jan 15 18:16:23 2014
@@ -31,6 +31,26 @@ import org.apache.logging.log4j.message.
public interface LogEvent extends Serializable {
/**
+ * Gets the MDC data.
+ *
+ * @return A copy of the Mapped Diagnostic Context or null.
+ */
+ Map<String, String> getContextMap();
+
+ /**
+ * Gets the NDC data.
+ *
+ * @return A copy of the Nested Diagnostic Context or null;
+ */
+ ThreadContext.ContextStack getContextStack();
+
+ /**
+ * Returns the fully qualified class name of the caller of the logging api.
+ * @return The fully qualified class name of the caller.
+ */
+ String getFQCN();
+
+ /**
* Gets the level.
* @return level.
*/
@@ -43,10 +63,11 @@ public interface LogEvent extends Serial
String getLoggerName();
/**
- * Gets the source of logging request.
- * @return source of logging request, may be null.
+ * Gets the Marker associated with the event.
+ * @return Marker
*/
- StackTraceElement getSource();
+ Marker getMarker();
+
/**
* Gets the message associated with the event.
@@ -55,20 +76,6 @@ public interface LogEvent extends Serial
*/
Message getMessage();
- /**
- * Gets the Marker associated with the event.
- * @return Marker
- */
- Marker getMarker();
-
- /**
- * Gets thread name.
- * @return thread name, may be null.
- * @doubt guess this could go into a thread context object too.
- * (RG) Why?
- */
- String getThreadName();
-
/**
* Gets event time in milliseconds since midnight, January 1, 1970 UTC.
@@ -80,31 +87,35 @@ public interface LogEvent extends Serial
/**
- * Gets throwable associated with logging request.
- * @return throwable, may be null.
+ * Gets the source of logging request.
+ * @return source of logging request, may be null.
*/
- Throwable getThrown();
-
+ StackTraceElement getSource();
/**
- * Gets the MDC data.
- *
- * @return A copy of the Mapped Diagnostic Context or null.
+ * Gets thread name.
+ * @return thread name, may be null.
+ * @doubt guess this could go into a thread context object too.
+ * (RG) Why?
*/
- Map<String, String> getContextMap();
+ String getThreadName();
/**
- * Gets the NDC data.
- *
- * @return A copy of the Nested Diagnostic Context or null;
+ * Gets throwable associated with logging request.
+ * @return throwable, may be null.
*/
- ThreadContext.ContextStack getContextStack();
+ Throwable getThrown();
/**
- * Returns the fully qualified class name of the caller of the logging api.
- * @return The fully qualified class name of the caller.
+ * Returns {@code true} if this event is the last one in a batch,
+ * {@code false} otherwise. Used by asynchronous Loggers and Appenders to
+ * signal to buffered downstream components when to flush to disk, as a
+ * more efficient alternative to the {@code immediateFlush=true}
+ * configuration.
+ * @return whether this event is the last one in a batch.
*/
- String getFQCN();
+ // see also LOG4J2-164
+ boolean isEndOfBatch();
/**
* Returns whether the source of the logging request is required
downstream.
@@ -119,6 +130,16 @@ public interface LogEvent extends Serial
boolean isIncludeLocation();
/**
+ * Sets whether this event is the last one in a batch.
+ * Used by asynchronous Loggers and Appenders to signal to buffered
+ * downstream components when to flush to disk, as a more efficient
+ * alternative to the {@code immediateFlush=true} configuration.
+ * @param endOfBatch {@code true} if this event is the last one in a batch,
+ * {@code false} otherwise.
+ */
+ void setEndOfBatch(boolean endOfBatch);
+
+ /**
* Sets whether the source of the logging request is required downstream.
* Asynchronous Loggers and Appenders use this flag to determine whether
* to take a {@code StackTrace} snapshot or not before handing off this
@@ -128,25 +149,4 @@ public interface LogEvent extends Serial
* @see #getSource()
*/
void setIncludeLocation(boolean locationRequired);
-
- /**
- * Returns {@code true} if this event is the last one in a batch,
- * {@code false} otherwise. Used by asynchronous Loggers and Appenders to
- * signal to buffered downstream components when to flush to disk, as a
- * more efficient alternative to the {@code immediateFlush=true}
- * configuration.
- * @return whether this event is the last one in a batch.
- */
- // see also LOG4J2-164
- boolean isEndOfBatch();
-
- /**
- * Sets whether this event is the last one in a batch.
- * Used by asynchronous Loggers and Appenders to signal to buffered
- * downstream components when to flush to disk, as a more efficient
- * alternative to the {@code immediateFlush=true} configuration.
- * @param endOfBatch {@code true} if this event is the last one in a batch,
- * {@code false} otherwise.
- */
- void setEndOfBatch(boolean endOfBatch);
}