Skip to content

Commit

Permalink
Add filename to logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Oct 2, 2024
1 parent f47cf54 commit 07b3267
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/s3daemon/s3daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ async def handle_client(client, reader, writer):
try:
await client.put_object(Body=f, Bucket=bucket, Key=key)
writer.write(b"Success")
log.info("%f %f sec - %s", start, time.time() - start, filename)
except Exception as e:
writer.write(bytes(repr(e), "UTF-8"))
log.info("%f %f sec", start, time.time() - start)
log.exception("%f %f sec - %s", start, time.time() - start, filename)


async def go():
Expand Down

0 comments on commit 07b3267

Please sign in to comment.