All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.core.logging.CurrentLogLevel Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.core.logging;

import com.softicar.platform.common.core.singleton.Singleton;

/**
 * This is a {@link Singleton} to hold the currently selected {@link LogLevel}.
 * 

* It is primarily used by the class {@link Log} to control the desired amount * of logging messages. * * @author Oliver Richers */ public class CurrentLogLevel { private static final Singleton LOG_LEVEL = new Singleton<>(() -> LogLevel.INFO).setInheritByIdentity(); /** * Returns the currently used log level. * * @return the current log level, never null */ public static LogLevel get() { return LOG_LEVEL.get(); } /** * Sets the new log level to use. */ public static void set(LogLevel logLevel) { LOG_LEVEL.set(logLevel); } /** * Resets the current log level to default. */ public static void reset() { set(null); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy