docs: add SwingBridge guide for logging and identifying logs per user#5807
Open
taefi wants to merge 4 commits into
Open
docs: add SwingBridge guide for logging and identifying logs per user#5807taefi wants to merge 4 commits into
taefi wants to merge 4 commits into
Conversation
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-5807.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 5a1cb94 |
New page (order 5) covering per-session log attribution: quick setup, an integration-level ladder from zero cooperation to the interop APIs, console prefixing and the Log4j2/Logback/JUL adapters, publishing the user identity for both A&A placements (login inside Swing vs. extracted to Vaadin), the reportIncident support workflow, and a section on old and new logging frameworks coexisting (Log4j 1.x bridging, guest config shadowing, Spring Boot Logback vs. Log4j2, SLF4J provider pinning). Also: configuration.adoc gains the swingbridge.consoleLogPrefix and swingbridge.log.user rows; installation-from-scratch.adoc explains its log4j-slf4j2-impl exclusion and links the trade-offs; the Vale vocabulary accepts appender(s), Splunk, and interop (clears 13 pre-existing spelling errors in the interop section).
…ation 'User Identification' reads like authentication; the page is about attributing log output to the user who produced it. Renames the page title, SEO title, heading, and the cross-reference labels in configuration.adoc and installation-from-scratch.adoc.
… attribution
Restructure the SwingBridge logging page so someone who knows Swing and core
Java, but is new to Vaadin/SwingBridge, can get from nothing to tagged logs
quickly:
- Turn "Quick Setup" into an explicit Step 1 / Step 2 / Step 3 path, leading
with the single JVM flag that needs no Swing-app changes.
- Retitle the identity section to the task ("Adding the User's Name to the
Logs") and lead with the one-line, no-dependency option
(System.setProperty("swingbridge.log.user", name) after login); give the
who-publishes subsections clearer, task-oriented headings.
- Document the new opt-in, swingbridge.includeUserInLogs, which puts the user's
name on every line ([swing:<runId>|<user>]) and via the %swingUser /
%X{swingUser} tokens; note it is off by default because the name is personal
data. Add the Log4j2/Logback/JUL token usage and a configuration.adoc row and
a troubleshooting entry.
taefi
force-pushed
the
swing-bridge-logging
branch
from
July 17, 2026 11:55
e6ba3bb to
bf084ff
Compare
The logging page is long; add an "on this page" table of contents so readers
don't lose track. Two complementary aids:
- :toc: — the DSP right-rail contents list, auto-built from the section
headings (same mechanism as flow/advanced/downloads.adoc).
- An "In this article" jump-list near the top linking the nine top-level
sections, for in-body navigation.
Also mark the feature's availability with a plain-text note under the title
("Available since SwingBridge 1.3."). The DSP since-badge macro has no
precedent for a tool version (only Vaadin/Hilla platform coordinates), so a
text note states it unambiguously without risking a broken badge.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new SwingBridge documentation page, Logging & Identifying Logs per User (
tools/modernization-toolkit/swing-bridge/logging.adoc, navigation slot 5), documenting the per-session log attribution features shipped in vaadin/vaadin-swing-bridge#239, vaadin/vaadin-swing-bridge#240, and vaadin/vaadin-swing-bridge#241.The page is written for readers without deep Vaadin knowledge and structured as an integration ladder, from zero cooperation to the interop APIs:
%X{swingSession}, async-safety explained), Logback, and JUL configuration blocks; every snippet labeled with the codebase it belongs to (Vaadin application vs. Swing application).SwingBridgeLogContext→ zero-change reflection observer) and login extracted to Vaadin with host-side navigation (setLogIdentityand its per-(session, application) keying), plus bespoke logging subsystems via the typed interop (@ExposedMethod initLogIdentity) and the both-sides case.reportIncident.slf4j.providerpin, and a coverage-expectations table.Supporting changes:
configuration.adoc: two new system-property rows (swingbridge.consoleLogPrefix,swingbridge.log.user) cross-linking the new page.installation-from-scratch.adoc: the template'slog4j-slf4j2-implexclusion is now explained and linked to the new page's trade-off discussion (previously the exclusion appeared with no rationale, and it directly affects where embedded applications' log output ends up).appender(s),Splunk, andinterop— the latter clears 13 pre-existing spelling errors across the existing interop section. The new page lints at 0 Vale errors.