You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@wellsfargo.com.INVALID on 2023/04/04 19:01:05 UTC
Access Log Valve
Hi everybody,
I'm trying to understand the Logging Valve better for the Access Logs. I saw in there that the Apache HTTPD Logging format is supported, but not entirely sure on how to implement. Is something like this kosher? We would like to output this in json format.
LogFormat "{ \"timestamp\":\"%{%Y-%m-%dT%H:%M:%S%z}t\", \"src_ip\":\"%a\", \"src_port\":\"%{canonical}p\", \"dest_ip\":\"%A\", \"dest_port\":\"%p\", \"http_host\":\"%{Host}i\", \"dest_name\":\"%V\", \"uri_path\":\"%U\", \"uri_query\":\"%q\", \"http_method\":\"%m\", \"status\":\"%>s\", \"http_user_agent\":\"%{User-Agent}i\", \"http_referrer\":\"%{Referer}i\", \"cookie\":\"%{wfacookie}C %{JSESSIONID}C %{CSISESSION}C %{CSESESSION}C\", \"ssl_version\":\"%{version}c\", \"ssl_cipher\":\"%{cipher}c\", \"bytes_out\":\"%B\", \"x_forwarded_for\":\"%{X-Forwarded-For}i\", \"user\":\"%u\", \"http_content_type\":\"%{Content-Type}i\", \"duration_microseconds\":\"%D\", \"protocol\":\"%H\", \"keep_alive\":\"%k\" }" json
Thank you,
Dream * Excel * Explore * Inspire
Jon McAlexander
Senior Infrastructure Engineer
Asst. Vice President
He/His
Middleware Product Engineering
Enterprise CIO | EAS | Middleware | Infrastructure Solutions
8080 Cobblestone Rd | Urbandale, IA 50322
MAC: F4469-010
Tel 515-988-2508 | Cell 515-988-2508
jonmcalexander@wellsfargo.com<ma...@wellsfargo.com>
This message may contain confidential and/or privileged information. If you are not the addressee or authorized to receive this for the addressee, you must not use, copy, disclose, or take any action based on this message or any information herein. If you have received this message in error, please advise the sender immediately by reply e-mail and delete this message. Thank you for your cooperation.
Re: [OT] Access Log Valve
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Jon,
On 4/4/23 15:01, jonmcalexander@wellsfargo.com.INVALID wrote:
> Hi everybody,
>
> I'm trying to understand the Logging Valve better for the Access Logs. I saw in there that the Apache HTTPD Logging format is supported, but not entirely sure on how to implement. Is something like this kosher? We would like to output this in json format.
>
> LogFormat "{ \"timestamp\":\"%{%Y-%m-%dT%H:%M:%S%z}t\", \"src_ip\":\"%a\", \"src_port\":\"%{canonical}p\", \"dest_ip\":\"%A\", \"dest_port\":\"%p\", \"http_host\":\"%{Host}i\", \"dest_name\":\"%V\", \"uri_path\":\"%U\", \"uri_query\":\"%q\", \"http_method\":\"%m\", \"status\":\"%>s\", \"http_user_agent\":\"%{User-Agent}i\", \"http_referrer\":\"%{Referer}i\", \"cookie\":\"%{wfacookie}C %{JSESSIONID}C %{CSISESSION}C %{CSESESSION}C\", \"ssl_version\":\"%{version}c\", \"ssl_cipher\":\"%{cipher}c\", \"bytes_out\":\"%B\", \"x_forwarded_for\":\"%{X-Forwarded-For}i\", \"user\":\"%u\", \"http_content_type\":\"%{Content-Type}i\", \"duration_microseconds\":\"%D\", \"protocol\":\"%H\", \"keep_alive\":\"%k\" }" json
What happens if I send this header to you?
Referer: ", "src_ip" : "127.0.0.1", "
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org