googleapis / googleapis/google-cloud-java

[java-logging] Sample: update quickstart snippet

Open
#11,924 1 comment 0 reactions 1 assignee Claimed by @arbrown View on GitHub
api: logging good first issue priority: p3 samples type: feature request
Dominant language
Java
Stars
2.1k
Forks
1.2k
Avg merge
1d 23h
Merged PRs (30d)
154

Description

Improve the Logging quickstart [in Java](https://cloud.google.com/logging/docs/samples/logging-quickstart#logging_quickstart-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 ](https://cloud.google.com/docs/authentication)
- [ ] encourage users to log with standard log wrapper [Logback](https://github.com/googleapis/java-logging-logback) rather than directly writing [LogEntries](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry). 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](https://cloud.google.com/logging/docs/samples/logging-write-log-entry)
- [ ] if applicable, a test for this sample

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.