Tests: Configure JUL logging based on VERBOSE flag [LUCENE-6189]
Open
legacy-jira-priority:Minor
type:enhancement
type:test
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I propose that LuceneTestCase check if VERBOSE is false, and if so then do this: `Logger.getLogger("org.apache.lucene").setLevel(Level.SEVERE)`.
This will allow test classes to grab a logger and log to it at appropriate levels without having to guard each log line with `if (VERBOSE) ...`
---
Migrated from [LUCENE-6189](https://issues.apache.org/jira/browse/LUCENE-6189) by David Smiley (@dsmiley)
Contributor guide
Research direction
Start in LuceneTestCase and inspect how the VERBOSE flag is handled during test setup. Configure the org.apache.lucene logger for non-verbose runs as described, then verify that tests still pass and that verbose runs retain their logging.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100