[slf4j-dev] svn commit: r1198 - in slf4j/trunk: . jul-to-slf4j/src/main/java/org/slf4j/bridge slf4j-ext/src/main/java/org/slf4j/ext slf4j-ext/src/main/java/org/slf4j/profiler
ceki at slf4j.org
ceki at slf4j.org
Thu Oct 16 17:25:18 CEST 2008
Author: ceki
Date: Thu Oct 16 17:25:18 2008
New Revision: 1198
Added:
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/package.html
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/package.html
Modified:
slf4j/trunk/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
slf4j/trunk/pom.xml
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/DurationUnit.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Profiler.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/ProfilerRegistry.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/StopWatch.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrument.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrumentStatus.java
slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Util.java
Log:
Minor javadoc improvements
Modified: slf4j/trunk/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java
==============================================================================
--- slf4j/trunk/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java (original)
+++ slf4j/trunk/jul-to-slf4j/src/main/java/org/slf4j/bridge/SLF4JBridgeHandler.java Thu Oct 16 17:25:18 2008
@@ -77,7 +77,7 @@
*
* @author Christian Stein
* @author Joern Huxhorn
- * @author Ceki G¨lc¨
+ * @author Ceki Gülcü
* @author Darryl Smith
*
* @since 1.5.1
Modified: slf4j/trunk/pom.xml
==============================================================================
--- slf4j/trunk/pom.xml (original)
+++ slf4j/trunk/pom.xml Thu Oct 16 17:25:18 2008
@@ -128,6 +128,12 @@
<title>SLF4J packages</title>
<packages>org.slf4j:org.slf4j.*</packages>
</group>
+
+ <group>
+ <title>SLF4J extensions</title>
+ <packages>org.slf4j.profiler:org.slf4j.ext:org.slf4j.instrumentation:org.slf4j.agent</packages>
+ </group>
+
<group>
<title>Jakarta Commons Logging packages</title>
<packages>org.apache.commons.*</packages>
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/LoggerWrapper.java Thu Oct 16 17:25:18 2008
@@ -6,12 +6,12 @@
import org.slf4j.spi.LocationAwareLogger;
/**
- * A helper class wrapping an org.slf4j.Logger instance
- * preserving location information if the wrapped
+ * A helper class wrapping an {@link org.slf4j.Logger}
+ * instance preserving location information if the wrapped
* instance supports it.
*
* @author Ralph Goers
- * @author Ceki Gulcu
+ * @author Ceki Gülcü
*/
public class LoggerWrapper implements Logger {
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLogger.java Thu Oct 16 17:25:18 2008
@@ -11,7 +11,7 @@
* activities.
*
* @author Ralph Goers
- * @author Ceki Gulcu
+ * @author Ceki Gülcü
*/
public class XLogger extends LoggerWrapper implements Logger {
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/XLoggerFactory.java Thu Oct 16 17:25:18 2008
@@ -15,7 +15,7 @@
* it wraps.
*
* @author Ralph Goers
- * @author Ceki Gulcu
+ * @author Ceki Gülcü
*/
public class XLoggerFactory {
Added: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/package.html
==============================================================================
--- (empty file)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/ext/package.html Thu Oct 16 17:25:18 2008
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+
+<html>
+ <head>
+ <title></title>
+ </head>
+
+
+ <body>
+ <p>SLF4J API extensions</p>
+ </body>
+</html>
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/DurationUnit.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/DurationUnit.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/DurationUnit.java Thu Oct 16 17:25:18 2008
@@ -24,6 +24,12 @@
package org.slf4j.profiler;
+/**
+ * An enum of supported time units.
+ *
+ * @author Ceki
+ *
+ */
public enum DurationUnit {
NANOSECOND, MICROSECOND, MILLISSECOND, SECOND;
}
\ No newline at end of file
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Profiler.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Profiler.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Profiler.java Thu Oct 16 17:25:18 2008
@@ -43,7 +43,8 @@
/**
* A poor man's profiler to measure the time elapsed performing
* some lengthy task.
- *
+ *
+ * @author Ceki Gülcü
*/
public class Profiler implements TimeInstrument {
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/ProfilerRegistry.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/ProfilerRegistry.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/ProfilerRegistry.java Thu Oct 16 17:25:18 2008
@@ -28,9 +28,9 @@
import java.util.Map;
/**
- * A miniminalistic registry of profilers.
+ * A minimalist registry of profilers.
*
- * @author Ceki
+ * @author Ceki Gülcü
*/
public class ProfilerRegistry {
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/StopWatch.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/StopWatch.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/StopWatch.java Thu Oct 16 17:25:18 2008
@@ -24,7 +24,13 @@
package org.slf4j.profiler;
-
+/**
+ * A very basic @{link TimeInstrument} which can be started and stopped
+ * once and only once.
+ *
+ * @author Ceki Gülcü
+ *
+ */
public class StopWatch implements TimeInstrument {
private String name;
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrument.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrument.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrument.java Thu Oct 16 17:25:18 2008
@@ -1,5 +1,14 @@
package org.slf4j.profiler;
+
+/**
+ * This interface sets the methods that must be implemented by
+ * {@link Profiler} and {@link StopWatch} classes. It settles the
+ * general feel of the profiler package.
+ *
+ * @author Ceki Gülcü
+ *
+ */
public interface TimeInstrument {
/**
@@ -10,7 +19,19 @@
TimeInstrumentStatus getStatus();
+
+ /**
+ * Start tis time instrument.
+ *
+ * @param name
+ */
void start(String name);
+
+ /**
+ * Stop this time instrument.
+ *
+ * @return this
+ */
TimeInstrument stop();
/**
@@ -20,7 +41,15 @@
*/
long elapsedTime();
+ /**
+ * Print information about this time instrument on the console.
+ */
void print();
+ /**
+ * If the time instrument has an associated logger, then log information about
+ * this time instrument. Note that {@link StopWatch} instances cannot log while {@link Profiler}
+ * instances can.
+ */
void log();
}
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrumentStatus.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrumentStatus.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/TimeInstrumentStatus.java Thu Oct 16 17:25:18 2008
@@ -30,6 +30,12 @@
package org.slf4j.profiler;
+/**
+ * A time instrument can be in STARTED or STOPPED status.
+ *
+ * @author Ceki Gülcü
+ *
+ */
enum TimeInstrumentStatus {
STARTED, STOPPED;
}
\ No newline at end of file
Modified: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Util.java
==============================================================================
--- slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Util.java (original)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/Util.java Thu Oct 16 17:25:18 2008
@@ -26,6 +26,13 @@
import java.text.DecimalFormat;
+/**
+ *
+ * A collection of utility methods.
+ *
+ * @author Ceki Gülcü
+ *
+ */
class Util {
static final long NANOS_IN_ONE_MICROSECOND = 1000;
Added: slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/package.html
==============================================================================
--- (empty file)
+++ slf4j/trunk/slf4j-ext/src/main/java/org/slf4j/profiler/package.html Thu Oct 16 17:25:18 2008
@@ -0,0 +1,13 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+
+<html>
+ <head>
+ <title></title>
+ </head>
+
+
+ <body>
+
+ <p>Poor man's profiler API</p>
+ </body>
+</html>
More information about the slf4j-dev
mailing list