Skip to content

Commit

Permalink
add missing error snippet tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jhuleatt committed Oct 24, 2023
1 parent 323a74a commit 484ab7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Python/quickstarts/monitor-cloud-logging/functions/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,10 @@ def get_inspirational_quote(req: https_fn.Request) -> https_fn.Response:
quote = default_quote
except:
e = sys.exc_info()[0]
# [START logError]
# Attach an error object as the second argument
logger.error("Unable to read quote from Firestore, sending default instead", error=e)
# [END logError]
quote = default_quote

# Attach relevant structured data to any log
Expand Down

0 comments on commit 484ab7f

Please sign in to comment.