Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-2750

Benchmark cannot be run without logging

    XMLWordPrintable

Details

    • 2022 Week 32-34 (from Aug 8)
    • Hide

      Run a benchmark without a logging framework configured.

      Show
      Run a benchmark without a logging framework configured.
    • NEW
    • NEW

    Description

      Unless I'm just doing something wrong, benchmarking without a logger causes the exception shown below.

      I've looked at the code, and the logging level seems to be used in exactly two places. One is to show it in the benchmark result. The other is when building the list of warnings in BenchmarkReport.fillWarningList(). Since that method checks whether the logging level is null, that makes me think it's not supposed to be required, making this more likely to be a bug than a feature. (Incidentally, that null check can be refactored away.)

      Exception in thread "main" java.lang.IllegalStateException: Logging level for loggerName (org.optaplanner.core) cannot be determined.
              at org.optaplanner.benchmark.impl.result.PlannerBenchmarkResult.resolveLoggingLevel(PlannerBenchmarkResult.java:315)
              at org.optaplanner.benchmark.impl.result.PlannerBenchmarkResult.initSystemProperties(PlannerBenchmarkResult.java:288)
              at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmarkingStarted(DefaultPlannerBenchmark.java:116)
              at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmark(DefaultPlannerBenchmark.java:97)
              at org.optaplanner.benchmark.impl.DefaultPlannerBenchmark.benchmarkAndShowReportInBrowser(DefaultPlannerBenchmark.java:424)

      Attachments

        Activity

          People

            lpetrovi@redhat.com Lukáš Petrovický (Inactive)
            chrfin Christoffer Fink (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: