Logging: Include the bytes sent in request logging
See original GitHub issueDescribe your question: I would like to log the number of bytes sent when doing request logging.
I may have not found it, but having a snippet like
app.get("/", ctx -> ctx.result("test"));
returns a correct Content-Length response header. I was however unable to retrieve that information from the Context
in the request logging lambda. Is there any trick that I am not seeing. grepping through the code I was also unable to see, where this was set, so I suppose it is set in jetty or some kotlin magic that evades my java eye.
Pointers appreciated 😃
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Apache Logging Basics - The Ultimate Guide To Logging
The access log contains information about requests coming into the web server. ... This includes bytes received, sent, and transferred (combination of ...
Read more >Size of "Bytes sent" in apache log file - Stack Overflow
I added to my apache log file another information-> %O which is indicated to bytes sent to user including headers.
Read more >Logging Request/Response size in access_log of Nginx
$bytes_sent is total number of bytes sent to the client (as opposed to $body_sent which is compatible with apache %B).
Read more >Access logs for your Application Load Balancer
Elastic Load Balancing provides access logs that capture detailed information about requests sent to your load balancer. Each log contains information such ...
Read more >request-log-format - IBM
Logs raw query strings that the user must decode manually. First line of the request. First line of the request including HTTP://HOSTNAME. Status....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I left the content length out for now. The header itself is calculated deep in jetty, see https://github.com/eclipse/jetty.project/blob/jetty-10.0.x/jetty-http/src/main/java/org/eclipse/jetty/http/HttpGenerator.java#L785-L795
Have you found a solution to this @spinscale ?