-
Notifications
You must be signed in to change notification settings - Fork 1
io microsphere logging logback util LoggerUtils
Type: Class | Module: microsphere-logback | Package: io.microsphere.logging.logback.util | Since: 1.0.0
Source:
microsphere-logback/src/main/java/io/microsphere/logging/logback/util/LoggerUtils.java
The Utilities class of Logback Logger
public abstract class LoggerUtilsAuthor: Mercy
-
Introduced in:
1.0.0 -
Current Project Version:
0.1.6-SNAPSHOT
This component is tested and compatible with the following Java versions:
| Java Version | Status |
|---|---|
| Java 8 | ✅ Compatible |
| Java 11 | ✅ Compatible |
| Java 17 | ✅ Compatible |
| Java 21 | ✅ Compatible |
| Java 25 | ✅ Compatible |
Add the following dependency to your pom.xml:
<dependency>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-logback</artifactId>
<version>${microsphere-logging.version}</version>
</dependency>Tip: Use the BOM (
microsphere-logging-dependencies) for consistent version management. See the Getting Started guide.
import io.microsphere.logging.logback.util.LoggerUtils;| Method | Description |
|---|---|
getLoggerContext |
Get the LoggerContext |
getLogger |
Get the Logger by specified name |
getLogger |
Get the Logger by the request class |
getLevel |
Get the Level of Logger by the specified logger name |
getLevel |
Get the Level of Logger |
setLoggerLevel |
Set the Level of Logger by the specified logger name |
setLoggerLevel |
Set the Level of Logger |
setLoggerLevel |
Set the Level of Logger |
getLevelString |
Get the Level String of Logger by the specified logger name |
getLevelString |
Get the Level String of Logger |
public static Level getLevel(@Nonnull String loggerName)Get the Level of Logger by the specified logger name
public static void setLoggerLevel(String loggerName, String levelName)Set the Level of Logger by the specified logger name
public static String getLevelString(@Nonnull String loggerName)Get the Level String of Logger by the specified logger name
Logger
This documentation was auto-generated from the source code of microsphere-logging.
java-logging
log4j
log4j2
logback
logging-commons
- DefaultLoggingLevelsResolver
- Logging
- LoggingLevelsResolver
- LoggingMXBeanAdapter
- LoggingMXBeanRegistrar
- LoggingUtils
logging-examples
logging-test