diff --git a/src/main/config/checkstyle-header.txt b/src/main/config/checkstyle-header.txt index d1eeebdc6..52c947d04 100644 --- a/src/main/config/checkstyle-header.txt +++ b/src/main/config/checkstyle-header.txt @@ -14,6 +14,6 @@ ^ \* You should have received a copy of the GNU General Public License along with\s*$ ^ \* Dependency-Check\. If not, see http://www.gnu.org/licenses/\.\s*$ ^ \*\s*$ -^ \* Copyright \(c\) 201[23] Jeremy Long\. All Rights Reserved\.\s*$ +^ \* Copyright \(c\) 201[23] (Jeremy Long|Steve Springett)\. All Rights Reserved\.\s*$ ^ \*/\s*$ ^package diff --git a/src/main/java/org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java b/src/main/java/org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java index 9bd5bff14..71c5a3b9e 100644 --- a/src/main/java/org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java +++ b/src/main/java/org/owasp/dependencycheck/reporting/VelocityLoggerRedirect.java @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License along with * Dependency-Check. If not, see http://www.gnu.org/licenses/. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2013 Steve Springett. All Rights Reserved. */ package org.owasp.dependencycheck.reporting; @@ -26,15 +26,15 @@ import java.util.logging.Level; import java.util.logging.Logger; /** - * DependencyCheck uses {@link java.util.logging.Logger} as a logging framework, + *

DependencyCheck uses {@link java.util.logging.Logger} as a logging framework, * and Apache Velocity uses a custom logging implementation that outputs to a * file named velocity.log by default. This class is an implementation of a * custom Velocity logger that redirects all velocity logging to the Java Logger * class. - *

- * This class was written to address permission issues when using DependencyCheck + *

+ * This class was written to address permission issues when using Dependency-Check * in a server environment (such as the Jenkins plugin). In some circumstances, - * Velocity would attempt to create velocity.log in an un-writable directory. + * Velocity would attempt to create velocity.log in an un-writable directory.

* * @author Steve Springett (steve.springett@owasp.org) */ @@ -42,6 +42,7 @@ public class VelocityLoggerRedirect implements LogChute { /** * This will be invoked once by the LogManager + * @param rsvc the RuntimeServices */ public void init(RuntimeServices rsvc) { // do nothing @@ -50,6 +51,8 @@ public class VelocityLoggerRedirect implements LogChute { /** * Given a Velocity log level and message, this method will * call the appropriate Logger level and log the specified values. + * @param level the logging level + * @param message the message to be logged */ public void log(int level, String message) { Logger.getLogger(Velocity.class.getName()).log(getLevel(level), message); @@ -58,6 +61,9 @@ public class VelocityLoggerRedirect implements LogChute { /** * Given a Velocity log level, message and Throwable, this method will * call the appropriate Logger level and log the specified values. + * @param level the logging level + * @param message the message to be logged + * @param t a throwable to log */ public void log(int level, String message, Throwable t) { Logger.getLogger(Velocity.class.getName()).log(getLevel(level), message, t); @@ -65,6 +71,7 @@ public class VelocityLoggerRedirect implements LogChute { /** * Will always return true. The property file will decide what level to log. + * @param level the logging level */ public boolean isLevelEnabled(int level) { return true; @@ -72,6 +79,7 @@ public class VelocityLoggerRedirect implements LogChute { /** * Maps Velocity log levels to {@link Logger} values. + * @param velocityLevel the logging level */ private Level getLevel(int velocityLevel) { switch (velocityLevel) {