Skip to content

io microsphere logging NoOpLoggerFactory

github-actions[bot] edited this page Apr 11, 2026 · 5 revisions

NoOpLoggerFactory

Type: Class | Module: microsphere-java-core | Package: io.microsphere.logging | Since: 1.0.0

Source: microsphere-java-core/src/main/java/io/microsphere/logging/NoOpLoggerFactory.java

Overview

A LoggerFactory implementation that provides instances of NoOpLogger, which perform no operations for logging calls. This factory is always available and has the lowest possible priority to ensure it is used only when no other logger implementations are available.

Example Usage

`// Get a NoOpLogger instance by class
Logger logger = NoOpLoggerFactory.getLogger(MyClass.class);

// Get a NoOpLogger instance by name
Logger logger = NoOpLoggerFactory.getLogger("my.logger.name");
`

Declaration

public class NoOpLoggerFactory extends LoggerFactory

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.2.8-SNAPSHOT

Version Compatibility

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

Examples

// Get a NoOpLogger instance by class
Logger logger = NoOpLoggerFactory.getLogger(MyClass.class);

// Get a NoOpLogger instance by name
Logger logger = NoOpLoggerFactory.getLogger("my.logger.name");

Usage

Maven Dependency

Add the following dependency to your pom.xml:

<dependency>
    <groupId>io.github.microsphere-projects</groupId>
    <artifactId>microsphere-java-core</artifactId>
    <version>${microsphere-java.version}</version>
</dependency>

Tip: Use the BOM (microsphere-java-dependencies) for consistent version management. See the Getting Started guide.

Import

import io.microsphere.logging.NoOpLoggerFactory;

API Reference

Public Methods

Method Description
createLogger
getPriority

See Also

  • NoOpLogger
  • LoggerFactory

This documentation was auto-generated from the source code of microsphere-java.

Home

annotation-processor

java-annotations

java-core

java-test

jdk-tools

lang-model

Clone this wiki locally