googleapis/google-cloud-java

[java-logging] Sample: update quickstart snippet

Open

#11.924 geöffnet am 9. Dez. 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (1 zugewiesene Person)Java (1.082 Forks)batch import
api: logginggood first issuepriority: p3samplestype: feature request

Repository-Metriken

Stars
 (1.763 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 21h) (145 gemergte PRs in 30 T)

Beschreibung

Improve the Logging quickstart in Java. Quickstart should work out of the box and contain all the instructions (in comments) so users can immediately see their logs.

Additional criteria:

  • include comments on various ways to authenticate
  • encourage users to log with standard log wrapper Logback rather than directly writing LogEntries. Context: In an ideal world, customers should be able to use existing logging frameworks native to their language. With some simple appender/handler to also ship logs to Cloud Logging. Customers aren't locked into logging library syntax, thus it's easier to both onboarding and offboard off of these client libraries.
  • comment that if users need more customizable logs, redirect to writing log entries
  • if applicable, a test for this sample

Contributor Guide