Skip to content

Commit

Permalink
Docs: reformatted snippet.
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation authored and crwilcox committed Jan 29, 2019
1 parent e79dfde commit 83c4805
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 8 additions & 5 deletions logging/docs/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,15 @@ def logger_usage(client, to_delete):

# [START logger_log_resource_text]
from google.cloud.logging.resource import Resource
res = Resource(type="generic_node",

res = Resource(
type="generic_node",
labels={
'location': 'us-central1-a',
'namespace': 'default',
'node_id': '10.10.10.1'
})
"location": "us-central1-a",
"namespace": "default",
"node_id": "10.10.10.1",
},
)
logger.log_struct(
{"message": "My first entry", "weather": "partly cloudy"}, resource=res
)
Expand Down
10 changes: 5 additions & 5 deletions logging/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-01-17T13:22:21.430628Z",
"updateTime": "2019-01-29T13:23:16.990671Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.16.6",
"dockerImage": "googleapis/artman@sha256:12722f2ca3fbc3b53cc6aa5f0e569d7d221b46bd876a2136497089dec5e3634e"
"version": "0.16.7",
"dockerImage": "googleapis/artman@sha256:d6c8ced606eb49973ca95d2af7c55a681acc042db0f87d135968349e7bf6dd80"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "0ac60e21a1aa86c07c1836865b35308ba8178b05",
"internalRef": "229626798"
"sha": "3cdb7227019524e7963071cf80a9624bf055b284",
"internalRef": "231246006"
}
},
{
Expand Down

0 comments on commit 83c4805

Please sign in to comment.