Skip to content

Access logs not properly displaying body size #2116

Closed
@ahopkins

Description

@ahopkins

In certain circumstances, the access logger is displaying the wrong body size.

@app.post("/")
async def post(request):
    print(request.json)
$ curl localhost:9999 -d '{"foo": "bar"}
{'foo': 'bar'}
[2021-04-18 01:43:33 +0300] - (sanic.access)[INFO][127.0.0.1:52172]: POST http://localhost:9999/  200 -1

In this example, it is being reported as -1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Participants

@ahopkins

Issue actions

    Access logs not properly displaying body size · Issue #2116 · sanic-org/sanic