Skip to content

Commit 91a2026

Browse files
committed
Convert .format string to f string
1 parent bc51c25 commit 91a2026

File tree

1 file changed

+1
-3
lines changed
  • opentelemetry-exporter-gcp-logging/src/opentelemetry/exporter/cloud_logging

1 file changed

+1
-3
lines changed

opentelemetry-exporter-gcp-logging/src/opentelemetry/exporter/cloud_logging/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,7 @@ def _write_log_entries(self, log_entries: list[LogEntry]):
188188
msg_size = LogEntry.pb(entry).ByteSize()
189189
if msg_size > DEFAULT_MAX_ENTRY_SIZE:
190190
logging.warning(
191-
"Cannot write log that is {} bytes which exceeds Cloud Logging's maximum limit of {}.".format(
192-
msg_size, DEFAULT_MAX_ENTRY_SIZE
193-
)
191+
f"Cannot write log that is {msg_size} bytes which exceeds Cloud Logging's maximum limit of {DEFAULT_MAX_ENTRY_SIZE}."
194192
)
195193
continue
196194
if msg_size + batch_byte_size > DEFAULT_MAX_REQUEST_SIZE:

0 commit comments

Comments
 (0)