Skip to content

docs(logging): fix uncompilable snippets, O(N^2) pagination, and 404 sample links in README - #80

Open
lqiu96 wants to merge 1 commit into
mainfrom
docs/log-0i-fix-readme-and-partials
Open

lqiu96 wants to merge 1 commit into
mainfrom
docs/log-0i-fix-readme-and-partials

Conversation

@lqiu96

@lqiu96 lqiu96 commented Nov 22, 2026

Copy link
Copy Markdown
Owner

Fixes broken snippets, dead links, and inaccurate documentation in java-logging/.readme-partials.yaml and java-logging/README.md:

  • Fixes uncompilable single-quoted .setProjectId('Your project ID') and updates BatchingSettings example to java.time.Duration (setDelayThresholdDuration).
  • Fixes nonexistent Context.Builder calls (setHttpRequest/setTrace -> setRequest/setTraceId).
  • Fixes the O(N^2) pagination loop (while (entries != null) nesting entries.iterateAll() and entries.getNextPage()) to a single for (LogEntry logEntry : entries.iterateAll()) loop.
  • Replaces per-request try (Logging logging = ...) with singleton reuse and shutdown logging.close() in finally.
  • Fixes all 11 broken 404 sample links in README.md (adding the missing java-logging/ monorepo path prefix, including Cloud Shell open_in_editor links) and updates the broken #javautillogging_configuration anchor to https://docs.cloud.google.com/logging/docs/setup/java#jul_config.
  • Migrates legacy cloud.google.com / developers.google.com URLs to docs.cloud.google.com, fixes typos (absense, entrys', stale AddLoggingHandler package), clarifies Java EE javax.servlet vs Jakarta servlets, clarifies LogEntry.Builder vs ContextHandler OpenTelemetry priority precedence, and aligns README.md version (3.43.0 -> 3.44.0).

Verified .readme-partials.yaml YAML syntax, verbatim synchronization with README.md, and on-disk existence of all 11 sample paths.

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.

1 participant