Formatting

This commit is contained in:
lieght
2025-09-21 05:30:51 +02:00
parent 0926df1945
commit 4221b91cfd
3 changed files with 14 additions and 22 deletions

View File

@@ -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();

View File

@@ -17,5 +17,4 @@ public class Player {
public char getSymbol() {
return this.symbol;
}
}

View File

@@ -27,6 +27,4 @@ class PlayerTest {
assertEquals('X', playerA.getSymbol());
assertEquals('O', playerB.getSymbol());
}
}