Class BenchmarkLoggingSetup

java.lang.Object
de.cuioss.benchmarking.common.util.BenchmarkLoggingSetup

public final class BenchmarkLoggingSetup extends Object
Centralized logging configuration for JMH benchmarks. Sets up logging to write to both console and a timestamped file in benchmark-results.

This class provides:

  • Dual output to console and file via TeeOutputStream
  • Capture of all System.out and System.err output
  • Timestamped log files in benchmark results directory
  • Configurable java.util.logging levels
  • Method Details

    • configureLogging

      public static void configureLogging(String benchmarkResultsDir)
      Configures logging to write to both console and a timestamped file in benchmark-results. Also redirects System.out and System.err to capture all console output.
      Parameters:
      benchmarkResultsDir - the directory where benchmark results are stored