Skip to content

Commit 31a7f69

Browse files
authoredSep 12, 2023
fix: add severity to structured log write (#783)
1 parent 1037afc commit 31a7f69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎samples/snippets/snippets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ def write_entry(logger_name):
3838
logger.log_text("Hello, world!")
3939

4040
# Simple text log with severity.
41-
logger.log_text("Goodbye, world!", severity="ERROR")
41+
logger.log_text("Goodbye, world!", severity="WARNING")
4242

4343
# Struct log. The struct can be any JSON-serializable dictionary.
4444
logger.log_struct(
4545
{
4646
"name": "King Arthur",
4747
"quest": "Find the Holy Grail",
4848
"favorite_color": "Blue",
49-
}
49+
}, severity="INFO"
5050
)
5151

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

0 commit comments

Comments
 (0)