googleapis/google-cloud-java

[java-logging] Sample: update quickstart snippet

Open

#11,924 建立於 2020年12月9日

在 GitHub 查看
 (1 留言) (0 反應) (1 負責人)Java (1,082 fork)batch import
api: logginggood first issuepriority: p3samplestype: feature request

倉庫指標

Star
 (1,763 star)
PR 合併指標
 (平均合併 2天 21小時) (30 天內合併 145 個 PR)

描述

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

貢獻者指南