mirror of
https://github.com/2OOP/pism.git
synced 2026-02-04 10:54:51 +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.
|
* 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
|
* <p>Provides methods to enable or disable logs globally or per class, with support for specifying
|
||||||
* specifying log levels either via {@link Level} enums or string names.
|
* log levels either via {@link Level} enums or string names.
|
||||||
* </p>
|
|
||||||
*/
|
*/
|
||||||
public final class Logging {
|
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() {
|
public static void disableAllLogs() {
|
||||||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||||
Configuration config = ctx.getConfiguration();
|
Configuration config = ctx.getConfiguration();
|
||||||
@@ -26,9 +23,7 @@ public final class Logging {
|
|||||||
ctx.updateLoggers();
|
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() {
|
public static void enableAllLogs() {
|
||||||
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
|
||||||
Configuration config = ctx.getConfiguration();
|
Configuration config = ctx.getConfiguration();
|
||||||
|
|||||||
@@ -17,5 +17,4 @@ public class Player {
|
|||||||
public char getSymbol() {
|
public char getSymbol() {
|
||||||
return this.symbol;
|
return this.symbol;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,4 @@ class PlayerTest {
|
|||||||
assertEquals('X', playerA.getSymbol());
|
assertEquals('X', playerA.getSymbol());
|
||||||
assertEquals('O', playerB.getSymbol());
|
assertEquals('O', playerB.getSymbol());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user