Skip to content

Switch from legacy JVM diagnostic logging to unified logging#26056

Open
renatsaf wants to merge 4 commits into
eclipse-ee4j:mainfrom
renatsaf:fix-issue-24064-unified-logging
Open

Switch from legacy JVM diagnostic logging to unified logging#26056
renatsaf wants to merge 4 commits into
eclipse-ee4j:mainfrom
renatsaf:fix-issue-24064-unified-logging

Conversation

@renatsaf

@renatsaf renatsaf commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Fixes #24064

Removes the legacy JVM diagnostic-logging options (-XX:+LogVMOutput, -XX:LogFile=...) and the now-orphaned -XX:+UnlockDiagnosticVMOptions from the codebase.

Changes

  • Templates (nucleus + appserver domain.xml): remove the orphaned -XX:+UnlockDiagnosticVMOptions (the LogVMOutput/LogFile options it used to unlock were already gone; nothing else needed it).
  • V2ToV3ConfigUpgrade: stop adding the legacy logging trio to upgraded configs (ADD_LIST), and add -XX:+LogVMOutput to BASE_REMOVAL_LIST so an upgrade actively strips it (alongside the existing -XX:LogFile removal).
  • Cleanup: refresh the misleading LogVMOutput comment in JvmOptions (its -XX:+Unlock* ordering logic is retained).
  • Test fixtures: remove the legacy logging options from domain.xml test fixtures. -XX:+UnlockDiagnosticVMOptions is kept in fixtures (it is a valid, non-deprecated diagnostic-unlock flag) where GFLauncherTest relies on it as a jvm-option pass-through marker.

Testing

  • nucleus/admin/launcher: 8/8 tests pass.
  • nucleus/common/common-util MiniXmlParserTest: 22/22 pass (validates the changed fixtures parse correctly).
  • nucleus/admin/server-mgmt: compiles.

Why no -Xlog replacement

The legacy options were already vestigial: default domains no longer route VM diagnostic output to jvm.log. There is therefore nothing to replace with -Xlog — this change removes the dead legacy configuration. Anyone who wants JVM unified logging can still add a standard -Xlog:... JVM option to their domain.

🤖 Generated with Claude Code

@renatsaf

renatsaf commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@
@OndroMih one thing I intentionally left out of scope: three documentation files still show the legacy flags, but only as illustrative list-jvm-options sample output (not as recommendations):

  • docs/administration-guide/src/main/asciidoc/jvm.adoc
  • docs/reference-manual/src/main/asciidoc/list-jvm-options.adoc
  • nucleus/core/kernel/src/main/manpages/com/sun/enterprise/v3/admin/commands/list-jvm-options.1

Since a default domain no longer contains -XX:+LogVMOutput / -XX:LogFile / -XX:+UnlockDiagnosticVMOptions, that example output is now slightly outdated. Do you want me to refresh those examples in this PR, or handle them as a separate doc-only follow-up?
@

@renatsaf

renatsaf commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

@
Update: I went ahead and refreshed those three list-jvm-options examples in a separate commit (1764dcb) so it is easy to drop or split into a doc-only follow-up if you would rather keep this PR code-only. Let me know your preference.
@

@OndroMih

Copy link
Copy Markdown
Contributor

Would be good to address the docs also in this PR to have everything together.

@renatsaf

renatsaf commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

@OndroMih agreed — done, all doc updates are now in this PR:

  • The three list-jvm-options sample-output files (admin guide jvm.adoc, reference manual list-jvm-options.adoc, and the list-jvm-options.1 manpage) were already refreshed in commit 1764dcb.
  • I just added 5f4cd75 to fix application-development-guide/.../debugging-apps.adoc, which was the one place the docs actively instructed users to run create-jvm-options -XX:+LogVMOutput / -XX:LogFile=.... That how-to is now replaced with the unified-logging equivalent (-Xlog:all:file=...), and the obsolete JRockit note is dropped.

One I intentionally left as-is: performance-tuning-guide/.../tuning-java.adoc uses java -XX:+UnlockDiagnosticVMOptions -XX:+PrintFlagsFinal -version — a standalone JVM diagnostic invocation (not GlassFish domain config). -XX:+UnlockDiagnosticVMOptions is a valid, non-deprecated flag and -XX:+PrintFlagsFinal requires it, so that example is still correct. Let me know if you would prefer I touch it anyway.

@renatsaf renatsaf force-pushed the fix-issue-24064-unified-logging branch from 5f4cd75 to 19547d6 Compare June 16, 2026 20:25
renatsaf and others added 4 commits June 16, 2026 23:26
Remove the legacy JVM diagnostic-logging options (-XX:+LogVMOutput and
-XX:LogFile) and the now-orphaned -XX:+UnlockDiagnosticVMOptions from the
domain.xml templates, and stop the V2-to-V3 config upgrade from adding
them (it now strips -XX:+LogVMOutput as well, alongside the existing
-XX:LogFile removal).

Refresh the now-misleading LogVMOutput comment in JvmOptions.

Test fixtures are cleaned of the legacy logging options; the still-valid
-XX:+UnlockDiagnosticVMOptions marker is kept where launcher tests rely
on it.

Fixes eclipse-ee4j#24064

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Refresh the list-jvm-options sample output in the docs and manpage so it
no longer shows -XX:+LogVMOutput, -XX:+UnlockDiagnosticVMOptions, and
-XX:LogFile, which are no longer present in a default domain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Bump the Eclipse Foundation copyright year to 2026 on the touched source
files, and add the Eclipse Foundation copyright line to the Oracle-only
test fixtures that were modified, as required by the copyright check.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The Class Loader Debugging section instructed users to enable a special
JVM log file via -XX:+LogVMOutput / -XX:LogFile, the legacy options this
PR removes. Replace them with the unified-logging equivalent
(-Xlog:all:file=...) and drop the obsolete JRockit note.

Addresses review feedback to keep all doc updates in this PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@renatsaf renatsaf force-pushed the fix-issue-24064-unified-logging branch from 19547d6 to b6cc12a Compare June 16, 2026 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch from Legacy JVM Diagnostic Logging to Unified Logging

2 participants