googleapis/google-cloud-java

[java-logging] Improve the Write logEntry sample

Open

#11,923 建立於 2020年12月10日

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

倉庫指標

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

描述

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

貢獻者指南