diff --git a/src/main/java/envoy/client/util/EnvoyLog.java b/src/main/java/envoy/client/util/EnvoyLog.java index ac90cd2..c9ef8cd 100644 --- a/src/main/java/envoy/client/util/EnvoyLog.java +++ b/src/main/java/envoy/client/util/EnvoyLog.java @@ -9,6 +9,12 @@ import java.util.logging.*; import envoy.client.data.Config; /** + * Configures the {@link java.util.logging} API to output the log into the + * console and a log file.
+ *
+ * Call the {@link EnvoyLog#attach(String)} method to configure a part of the + * logger hierarchy.
+ *
* Project: envoy-client
* File: EnvoyLogger.java
* Created: 14 Dec 2019
@@ -52,9 +58,10 @@ public class EnvoyLog { /** * Configures all loggers that are contained within the hierarchy of a specific - * path - * + * path to use the console and file handlers. + * * @param path the path to the loggers to configure + * @since Envoy Client v0.4-alpha */ public static void attach(String path) { // Get root logger @@ -69,10 +76,11 @@ public class EnvoyLog { } /** - * Creates a {@link Logger} with a specified name + * Creates a logger for a specified class, which output will be displayed inside + * the console and written to the log file. * * @param logClass the class in which the logger is used - * @return the created {@link Logger} + * @return the created logger * @since Envoy v0.2-alpha */ public static Logger getLogger(Class logClass) { @@ -81,23 +89,17 @@ public class EnvoyLog { } /** - * @param fileLevelBarrier the severity below which logRecords will not be - * written to the log file. At or above they'll also be - * logged in a file. Can be written either in Digits - * from 0 - 1000 or with the according name of the level + * Defines the logger level required for a record to be written to the log file. + * + * @param fileLevelBarrier the log file level * @since Envoy v0.2-alpha */ - public static void setFileLevelBarrier(Level fileLevelBarrier) { - if (fileHandler != null) fileHandler.setLevel(fileLevelBarrier); - - } + public static void setFileLevelBarrier(Level fileLevelBarrier) { if (fileHandler != null) fileHandler.setLevel(fileLevelBarrier); } /** - * @param consoleLevelBarrier the severity below which logRecords will not be - * written to the console. At or above they'll also - * be logged in a file. Can be written either in - * digits from 0 - 1000 or with the according name of - * the level + * Defines the logger level required for a record to be written to the console. + * + * @param consoleLevelBarrier the console logger level * @since Envoy v0.2-alpha */ public static void setConsoleLevelBarrier(Level consoleLevelBarrier) {