Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access logs not properly displaying body size #2116

Closed
ahopkins opened this issue Apr 17, 2021 · 0 comments · Fixed by #2117
Closed

Access logs not properly displaying body size #2116

ahopkins opened this issue Apr 17, 2021 · 0 comments · Fixed by #2117
Assignees
Labels

Comments

@ahopkins
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant