Skip to content

Commit 4395b35

Browse files
waprindhermes
authored andcommitted
Merge pull request googleapis#2450 from waprin/log_struct_usage
Fix log_struct usage
1 parent cef457f commit 4395b35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/logging-usage.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ Write a dictionary entry to a logger.
5454
>>> from google.cloud import logging
5555
>>> client = logging.Client()
5656
>>> logger = client.logger('log_name')
57-
>>> logger.log_struct(
58-
... message="My second entry",
59-
... weather="partly cloudy") # API call
57+
>>> logger.log_struct({
58+
... 'message': 'My second entry',
59+
... 'weather': 'partly cloudy'}) # API call
6060

6161

6262
Retrieving log entries

0 commit comments

Comments
 (0)