Skip to content

Commit

Permalink
chore: add api-logging codeowners (#3093)
Browse files Browse the repository at this point in the history
- Debranded logging and error reporting from "Stackdriver"
- Added api-logging team to codeowners of logging and error reporting
  • Loading branch information
Simon Zeltser committed Oct 29, 2020
1 parent 67440f1 commit 07004ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
/bigquery/ @googleapis/api-bigquery
/datastore/ @tritone
/firestore/ @tritone
/logging/ @nicoleczhu
/pubsub/ @googleapis/api-pubsub
/spanner/ @skuruppu
/storage/ @tritone
/errorreporting/ @googleapis/api-logging
/logging/ @googleapis/api-logging
5 changes: 5 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ assign_issues_by:
- 'api: spanner'
to:
- skuruppu
- labels:
- 'api: logging'
- 'api: clouderrorreporting'
to:
- nicolezhu
7 changes: 5 additions & 2 deletions logging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,30 @@

First create a `logging.Client` to use throughout your application:
[snip]:# (logging-1)

```go
ctx := context.Background()
client, err := logging.NewClient(ctx, "my-project")
if err != nil {
// TODO: Handle error.
// TODO: Handle error.
}
```

Usually, you'll want to add log entries to a buffer to be periodically flushed
(automatically and asynchronously) to the Cloud Logging service.
[snip]:# (logging-2)

```go
logger := client.Logger("my-log")
logger.Log(logging.Entry{Payload: "something happened!"})
```

Close your client before your program exits, to flush any buffered log entries.
[snip]:# (logging-3)

```go
err = client.Close()
if err != nil {
// TODO: Handle error.
// TODO: Handle error.
}
```

0 comments on commit 07004ba

Please sign in to comment.