googleapis/google-cloud-java

[java-logging] Improve the Write logEntry sample

Open

#11.923 aberto em 10 de dez. de 2020

Ver no GitHub
 (0 comments) (0 reactions) (1 assignee)Java (1.082 forks)batch import
api: logginggood first issuelang: javapriority: p3samplestype: feature request

Métricas do repositório

Stars
 (1.763 stars)
Métricas de merge de PR
 (Mesclagem média 2d 21h) (145 fundiu PRs em 30d)

Description

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

Guia do colaborador