Skip to content

Commit

Permalink
fix: add severity to structured log write
Browse files Browse the repository at this point in the history
  • Loading branch information
minherz committed Sep 12, 2023
1 parent 1037afc commit 4411bb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/snippets/snippets.py
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 4411bb5

Please sign in to comment.