Claudenw commented on code in PR #233:
URL: https://github.com/apache/creadur-rat/pull/233#discussion_r1564526816


##########
apache-rat-core/src/main/java/org/apache/rat/utils/Log.java:
##########
@@ -59,51 +59,105 @@ public enum Level {
      */
     void log(Level level, String message);
     
+    /**
+     * Write a log message at the specified level.
+     * @param level the level to write the message at.
+     * @param message the mesage to write.
+     */
     default void log(Level level, Object message) {
         log(level, message == null ? "NULL" : message.toString());
     }
     
+    /**
+     * Write a message at DEBUG level.
+     * @param message the message to write.
+     */
     default void debug(Object message) {
         log(Level.DEBUG, message);
     }
 
+    /**
+     * Write a message at INFO level.
+     * @param message the message to write.
+     */
     default void info(Object message) {
         log(Level.INFO, message);
     }
     
+    /**
+     * Write a message at WARN level.
+     * @param message the message to write.
+     */
     default void warn(Object message) {
         log(Level.WARN, message);
     }
     
+    /**
+     * Write a message at ERROR level.
+     * @param message the message to write.
+     */
     default void error(Object message) {
         log(Level.ERROR, message);
     }
-    default void log(Level level, String message, Throwable t) {       
+    
+    /**
+     * Write a log message and report throwable stack trace at the specified 
log level.
+     * @param level the level to report at
+     * @param message the message for the log
+     * @param throwable the throwable
+     */
+    default void log(Level level, String message, Throwable throwable) {       
         StringWriter writer = new StringWriter(500);
         PrintWriter pWriter = new PrintWriter(writer);
         pWriter.print(message);
         pWriter.print(System.lineSeparator());
-        t.printStackTrace(pWriter);
+        throwable.printStackTrace(pWriter);

Review Comment:
   `printStackTrace(writer)` will write to the writer and not to error.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@creadur.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to