Skip to content

io microsphere logging test junit4 LoggingLevelsStatement

github-actions[bot] edited this page May 30, 2026 · 9 revisions

LoggingLevelsStatement

Type: Class | Module: microsphere-logging-test | Package: io.microsphere.logging.test.junit4 | Since: 1.0.0

Source: microsphere-logging-test/src/main/java/io/microsphere/logging/test/junit4/LoggingLevelsStatement.java

Overview

The Statement repeats the execution with the specified logging levels.

Declaration

public class LoggingLevelsStatement extends Statement

Author: Mercy

Version Information

  • Introduced in: 1.0.0
  • Current Project Version: 0.1.14-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

Method Examples

evaluate

LoggingLevelsStatement statement = new LoggingLevelsStatement(base, description, "TRACE", "DEBUG", "INFO");
// Used internally by LoggingLevelsRule; each test method is executed with TRACE, DEBUG and INFO level
  @ClassRule
  public static final LoggingLevelsRule rule = LoggingLevelsRule.levels("TRACE", "DEBUG", "INFO");

Usage

Maven Dependency

Add the following dependency to your pom.xml:

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

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

Import

import io.microsphere.logging.test.junit4.LoggingLevelsStatement;

API Reference

Public Methods

Method Description
evaluate Creates a new LoggingLevelsStatement with the specified statement, description, and logging levels.

Method Details

evaluate

public void evaluate()

Creates a new LoggingLevelsStatement with the specified statement, description, and logging levels.

Example Usage

`LoggingLevelsStatement statement = new LoggingLevelsStatement(base, description, "TRACE", "DEBUG", "INFO");
`

See Also

  • Statement

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

Clone this wiki locally