mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 19:04:49 +00:00
Formatting
This commit is contained in:
@@ -8,16 +8,13 @@ import org.apache.logging.log4j.core.config.LoggerConfig;
|
||||
|
||||
/**
|
||||
* Utility class for configuring logging levels dynamically at runtime using Log4j 2.
|
||||
* <p>
|
||||
* Provides methods to enable or disable logs globally or per class, with support for
|
||||
* specifying log levels either via {@link Level} enums or string names.
|
||||
* </p>
|
||||
*
|
||||
* <p>Provides methods to enable or disable logs globally or per class, with support for specifying
|
||||
* log levels either via {@link Level} enums or string names.
|
||||
*/
|
||||
public final class Logging {
|
||||
|
||||
/**
|
||||
* Disables all logging globally by setting the root logger level to {@link Level#OFF}.
|
||||
*/
|
||||
/** Disables all logging globally by setting the root logger level to {@link Level#OFF}. */
|
||||
public static void disableAllLogs() {
|
||||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||
Configuration config = ctx.getConfiguration();
|
||||
@@ -26,9 +23,7 @@ public final class Logging {
|
||||
ctx.updateLoggers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables all logging globally by setting the root logger level to {@link Level#ALL}.
|
||||
*/
|
||||
/** Enables all logging globally by setting the root logger level to {@link Level#ALL}. */
|
||||
public static void enableAllLogs() {
|
||||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||
Configuration config = ctx.getConfiguration();
|
||||
|
||||
@@ -17,5 +17,4 @@ public class Player {
|
||||
public char getSymbol() {
|
||||
return this.symbol;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,6 +27,4 @@ class PlayerTest {
|
||||
assertEquals('X', playerA.getSymbol());
|
||||
assertEquals('O', playerB.getSymbol());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user