> Please review this small fix. > > Configuring the same log file as `vm.log`, `$PWD/vm.log`, and `./vm.log` > creates separate outputs, splitting the messages across multiple files. > > **Fix:** > > Let each output match its own name through `matches_name()`. For file > outputs, also check `os::same_files()` so different paths to the same file > reuse the existing output. > > **Testing:** > > - Added `TestEquivalentLogFilePaths.java`. > - `gtest:LogConfiguration/server`: 21 passed, 0 failed. > - `test/hotspot/jtreg/serviceability/logging`: 7 passed, 0 failed. > - `test/hotspot/jtreg/runtime/logging`: 33 passed, 0 failed. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai).
Yunbo Zhang has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains five additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into JDK-8392135 - 8392135: Unified logging creates extra log files - 8392135: Unified logging creates extra log files Synchronize file identity comparisons with rotation using the existing semaphore, and add a concurrent alias-matching regression test. - 8392135: Unified logging creates extra log files Use virtual output name matching instead of identifying output types by name prefixes and downcasting. Add coverage for file and standard output matching. - 8392135: Unified logging creates extra log files ------------- Changes: - all: https://git.openjdk.org/jdk/pull/33090/files - new: https://git.openjdk.org/jdk/pull/33090/files/96b7ec15..6b3036c3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=33090&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=33090&range=03-04 Stats: 160127 lines in 3042 files changed: 96373 ins; 40314 del; 23440 mod Patch: https://git.openjdk.org/jdk/pull/33090.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/33090/head:pull/33090 PR: https://git.openjdk.org/jdk/pull/33090
