googleapis/google-cloud-java

[java-logging] Improve the Write logEntry sample

オープン

#11,923 opened on 2020/12/10

 (0 件のコメント) (0 件のリアクション) (1 人の担当者)Java (1,082 件のフォーク)batch import
api: logginggood first issuelang: javapriority: p3samplestype: feature request

Repository metrics

Stars
 (1,763 個のスター)
PR merge metrics
 (平均マージ 5d 7h) (30d で 195 merged PRs)

説明

Improve the Write logEntry sample on this page

This page is referenced by docs that explicitly talk about LogEntries. So we should demo this “advanced” logging technique, even though we do recommend the standard log wrapper approach in the quickstarts.

Criteria:

  • Demo how to write a text logEntry (textPayload)
  • Demo how to write a struct logEntry (jsonPayload)
  • Include: severity level, labels, resource type (“global”)
  • Demo: batch logging vs writing one log at a time
  • Update accompanying tests

Region tag: logging_write_log_entry

コントリビューターガイド