diff --git a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java index 7b425093..50f6d48c 100644 --- a/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java +++ b/jcl-over-slf4j/src/main/java/org/apache/commons/logging/Log.java @@ -102,6 +102,8 @@ public interface Log { *
Call this method to prevent having to perform expensive operations
* (for example, String concatenation)
* when the log level is more than info.
Call this method to prevent having to perform expensive operations
* (for example, String concatenation)
* when the log level is more than trace.
null if there is no such attribute.
*
- * @param name
- * Name of the attribute to return
+ * @param name Name of the attribute to return
+ * @return configuration attribute
*/
public abstract Object getAttribute(String name);
@@ -149,6 +149,8 @@ public abstract class LogFactory {
* Return an array containing the names of all currently defined configuration
* attributes. If there are no such attributes, a zero length array is
* returned.
+ *
+ * @return names of all currently defined configuration attributes
*/
public abstract String[] getAttributeNames();
diff --git a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
index c69c9d02..c41fa99a 100644
--- a/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
+++ b/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
@@ -146,7 +146,7 @@ public class SLF4JBridgeHandler extends Handler {
/**
* Returns true if SLF4JBridgeHandler has been previously installed, returns false otherwise.
*
- * @return
+ * @return true if SLF4JBridgeHandler is already installed, false other wise
* @throws SecurityException
*/
public static boolean isInstalled() throws SecurityException {
diff --git a/pom.xml b/pom.xml
index 30d2be2a..a57ff6c5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -216,14 +216,14 @@
Once you are comfortable using loggers, i.e. instances of this interface, consider using + * MDC as well as Markers.
+ * * @author Ceki Gülcü */ public interface Logger { @@ -66,6 +73,7 @@ public interface Logger { /** * Return the name of thisLogger instance.
+ * @return name of this logger instance
*/
public String getName();
@@ -148,6 +156,9 @@ public interface Logger {
* marker data is also taken into account.
*
* @param marker The marker data to take into consideration
+ * @return True if this Logger is enabled for the TRACE level,
+ * false otherwise.
+ *
* @since 1.4
*/
public boolean isTraceEnabled(Marker marker);
@@ -285,6 +296,8 @@ public interface Logger {
* marker data is also taken into account.
*
* @param marker The marker data to take into consideration
+ * @return True if this Logger is enabled for the DEBUG level,
+ * false otherwise.
*/
public boolean isDebugEnabled(Marker marker);
@@ -415,6 +428,7 @@ public interface Logger {
* data is also taken into consideration.
*
* @param marker The marker data to take into consideration
+ * @return true if this logger is warn enabled, false otherwise
*/
public boolean isInfoEnabled(Marker marker);
@@ -544,6 +558,8 @@ public interface Logger {
* data is also taken into consideration.
*
* @param marker The marker data to take into consideration
+ * @return True if this Logger is enabled for the WARN level,
+ * false otherwise.
*/
public boolean isWarnEnabled(Marker marker);
@@ -671,6 +687,8 @@ public interface Logger {
* marker data is also taken into consideration.
*
* @param marker The marker data to take into consideration
+ * @return True if this Logger is enabled for the ERROR level,
+ * false otherwise.
*/
public boolean isErrorEnabled(Marker marker);
diff --git a/slf4j-api/src/main/java/org/slf4j/MDC.java b/slf4j-api/src/main/java/org/slf4j/MDC.java
index ed61b1fd..bdb30e89 100644
--- a/slf4j-api/src/main/java/org/slf4j/MDC.java
+++ b/slf4j-api/src/main/java/org/slf4j/MDC.java
@@ -45,7 +45,7 @@ import org.slf4j.spi.MDCAdapter;
* and slf4j-nop, {@link NOPMDCAdapter} will be used.
*
*
- * Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j
+ * Thus, as a SLF4J user, you can take advantage of MDC in the presence of log4j,
* logback, or java.util.logging, but without forcing these systems as
* dependencies upon your users.
*
@@ -90,13 +90,16 @@ public class MDC {
}
/**
- * Put a context value (the val parameter) as identified with the
- * key parameter into the current thread's context map. The
+ * Put a diagnostic context value (the val parameter) as identified with the
+ * key parameter into the current thread's diagnostic context map. The
* key parameter cannot be null. The val parameter
* can be null only if the underlying implementation supports it.
*
*
* This method delegates all work to the MDC of the underlying logging system.
+ *
+ * @param key non-null key
+ * @param val value to put in the map
*
* @throws IllegalArgumentException
* in case the "key" parameter is null
@@ -114,12 +117,13 @@ public class MDC {
}
/**
- * Get the context identified by the key parameter. The
+ * Get the diagnostic context identified by the key parameter. The
* key parameter cannot be null.
*
*
* This method delegates all work to the MDC of the underlying logging system.
- *
+ *
+ * @param key
* @return the string value identified by the key parameter.
* @throws IllegalArgumentException
* in case the "key" parameter is null
@@ -137,11 +141,12 @@ public class MDC {
}
/**
- * Remove the the context identified by the key parameter using
+ * Remove the diagnostic context identified by the key parameter using
* the underlying system's MDC implementation. The key parameter
* cannot be null. This method does nothing if there is no previous value
* associated with key.
- *
+ *
+ * @param key
* @throws IllegalArgumentException
* in case the "key" parameter is null
*/
diff --git a/slf4j-api/src/main/java/org/slf4j/Marker.java b/slf4j-api/src/main/java/org/slf4j/Marker.java
index 1349c403..3d59b524 100644
--- a/slf4j-api/src/main/java/org/slf4j/Marker.java
+++ b/slf4j-api/src/main/java/org/slf4j/Marker.java
@@ -115,8 +115,7 @@ public interface Marker extends Serializable {
*
* If 'name' is null the returned value is always false.
*
- * @param other
- * The marker to test for inclusion.
+ * @param name The marker name to test for inclusion.
* @return Whether this marker contains the other marker.
*/
public boolean contains(String name);
diff --git a/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java b/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
index 84cb4e82..84cfcb6b 100644
--- a/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
+++ b/slf4j-api/src/main/java/org/slf4j/MarkerFactory.java
@@ -74,6 +74,7 @@ public class MarkerFactory {
/**
* Create a marker which is detached (even at birth) from the MarkerFactory.
*
+ * @param name the name of the marker
* @return a dangling marker
* @since 1.5.1
*/
diff --git a/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java b/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
index b36be306..a1709ddb 100644
--- a/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
+++ b/slf4j-api/src/main/java/org/slf4j/helpers/NOPLogger.java
@@ -80,7 +80,7 @@ public class NOPLogger extends MarkerIgnoringBase {
}
/** A NOP implementation. */
- public final void trace(String format, Object[] argArray) {
+ public final void trace(String format, Object... argArray) {
// NOP
}
@@ -113,7 +113,7 @@ public class NOPLogger extends MarkerIgnoringBase {
}
/** A NOP implementation. */
- public final void debug(String format, Object[] argArray) {
+ public final void debug(String format, Object... argArray) {
// NOP
}
@@ -150,7 +150,7 @@ public class NOPLogger extends MarkerIgnoringBase {
}
/** A NOP implementation. */
- public final void info(String format, Object[] argArray) {
+ public final void info(String format, Object... argArray) {
// NOP
}
@@ -185,7 +185,7 @@ public class NOPLogger extends MarkerIgnoringBase {
}
/** A NOP implementation. */
- public final void warn(String format, Object[] argArray) {
+ public final void warn(String format, Object... argArray) {
// NOP
}
@@ -217,7 +217,7 @@ public class NOPLogger extends MarkerIgnoringBase {
}
/** A NOP implementation. */
- public final void error(String format, Object[] argArray) {
+ public final void error(String format, Object... argArray) {
// NOP
}
diff --git a/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java b/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
index de1f5624..4e21dac2 100644
--- a/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
+++ b/slf4j-ext/src/main/java/org/slf4j/cal10n/LocLoggerFactory.java
@@ -56,7 +56,7 @@ public class LocLoggerFactory {
* Get an LocLogger instance by name.
*
* @param name
- * @return
+ * @return LocLogger instance by name.
*/
public LocLogger getLocLogger(String name) {
return new LocLogger(LoggerFactory.getLogger(name), imc);
@@ -67,9 +67,8 @@ public class LocLoggerFactory {
* after the class.
*
* @param clazz
- * @return
+ * @return LocLogger instance by class
*/
- @SuppressWarnings("unchecked")
public LocLogger getLocLogger(Class clazz) {
return getLocLogger(clazz.getName());
}
diff --git a/slf4j-ext/src/main/java/org/slf4j/cal10n/package.html b/slf4j-ext/src/main/java/org/slf4j/cal10n/package.html
new file mode 100644
index 00000000..39cfc8d1
--- /dev/null
+++ b/slf4j-ext/src/main/java/org/slf4j/cal10n/package.html
@@ -0,0 +1,12 @@
+
+
+
+
SLF4J API extensions
+ + diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java b/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java index c936a2ea..7430548a 100755 --- a/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java +++ b/slf4j-ext/src/main/java/org/slf4j/ext/EventData.java @@ -97,6 +97,7 @@ public class EventData implements Serializable { /** * Serialize all the EventData items into an XML representation. * + * @param map the Map to transform * @return an XML String containing all the EventDAta items. */ public static String toXML(MapContrary to {@link LoggerFactory#getLogger(String)} method of
- * {@link LoggerFactory}, each call to {@link getXLogger}
- * produces a new instance of XLogger. This should not matter because an
- * XLogger instance does not have any state beyond that of the Logger instance
- * it wraps.
+ * {@link LoggerFactory}, each call to {@link #getXLogger(String)}
+ * produces a new instance of XLogger. This should not matter
+ * because an XLogger instance does not have any state beyond that of
+ * the {@link org.slf4j.Logger Logger} instance it wraps.
*
* @author Ralph Goers
* @author Ceki Gülcü
@@ -46,7 +46,7 @@ public class XLoggerFactory {
* Get an XLogger instance by name.
*
* @param name
- * @return
+ * @return XLogger instance
*/
public static XLogger getXLogger(String name) {
return new XLogger(LoggerFactory.getLogger(name));
@@ -57,9 +57,8 @@ public class XLoggerFactory {
* will be named after the class.
*
* @param clazz
- * @return
+ * @return XLogger instance by name
*/
- @SuppressWarnings("unchecked")
public static XLogger getXLogger(Class clazz) {
return getXLogger(clazz.getName());
}
diff --git a/slf4j-ext/src/main/java/org/slf4j/ext/package.html b/slf4j-ext/src/main/java/org/slf4j/ext/package.html
index f9ea74a8..5c55a91b 100644
--- a/slf4j-ext/src/main/java/org/slf4j/ext/package.html
+++ b/slf4j-ext/src/main/java/org/slf4j/ext/package.html
@@ -7,6 +7,6 @@
SLF4J API extensions
+Localized logging using the CAL10N API.