Skip to content

Commit

Permalink
fix: add severity to structured log write (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
minherz authored Sep 12, 2023
1 parent 1037afc commit 31a7f69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/snippets/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def write_entry(logger_name):
logger.log_text("Hello, world!")

# Simple text log with severity.
logger.log_text("Goodbye, world!", severity="ERROR")
logger.log_text("Goodbye, world!", severity="WARNING")

# Struct log. The struct can be any JSON-serializable dictionary.
logger.log_struct(
{
"name": "King Arthur",
"quest": "Find the Holy Grail",
"favorite_color": "Blue",
}
}, severity="INFO"
)

print("Wrote logs to {}.".format(logger.name))
Expand Down

0 comments on commit 31a7f69

Please sign in to comment.