Updated Javadoc in EnvoyLog

This commit is contained in:
Kai S. K. Engelbart 2020-02-18 16:10:33 +01:00
parent 6dd1b40130
commit 353a6dd646

View File

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