You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by rg...@apache.org on 2010/05/30 09:28:21 UTC
svn commit: r949486 - in
/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j:
Logger.java spi/AbstractLogger.java
Author: rgoers
Date: Sun May 30 07:28:21 2010
New Revision: 949486
URL: http://svn.apache.org/viewvc?rev=949486&view=rev
Log:
Add comment and an entry method with no params.
Modified:
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java
logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java?rev=949486&r1=949485&r2=949486&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/Logger.java Sun May 30 07:28:21 2010
@@ -36,9 +36,17 @@ public interface Logger {
/**
* Log entry to a method.
+ */
+ void entry();
+
+ /**
+ * Log entry to a method.
* @param params The parameters to the method.
* @doubt Use of varargs results in array creation which can be a substantial portion of no-op case.
- * LogMF/LogSF provides several overrides to avoid vararg except in edge cases.
+ * LogMF/LogSF provides several overrides to avoid vararg except in edge cases. (RG) LogMF
+ * and LogSF implement these in LogXF which calls logger.callAppenders. callAppenders is
+ * part of the implementation and cannot be used by the API. Adding more methods here
+ * and in AbstractLogger is sufficient.
*/
void entry(Object... params);
Modified: logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java?rev=949486&r1=949485&r2=949486&view=diff
==============================================================================
--- logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java (original)
+++ logging/log4j/branches/BRANCH_2_0_EXPERIMENTAL/rgoers/log4j2-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java Sun May 30 07:28:21 2010
@@ -32,6 +32,17 @@ public abstract class AbstractLogger imp
protected String getFQCN() {
return AbstractLogger.class.getName();
}
+
+
+ /**
+ * Log entry to a method.
+ */
+ public void entry() {
+ if (isEnabled(Level.TRACE, Logger.ENTRY_MARKER, (Object)null, null)) {
+ log(Logger.ENTRY_MARKER, getFQCN(), Level.TRACE, new SimpleMessage(" entry"), null);
+ }
+ }
+
/**
* Log entry to a method.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org