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

贡献者指南