Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tomcat value, changing the format of the log

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The original tomcat log format is as follows:

If we want to display the time in the log, we need to add %T:

The following table shows what each value in tomcat log format means:

Values Description

%a Remote IP address%A Local IP address%b Bytes sent, excluding HTTP headers, or '' if zero%B Bytes sent, excluding HTTP headers%h Remote hostname (or IP address if enableLookups for the connector isfalse)%H Request protocol%l Remote logical username from identd%m Request method (GET, POST, and so on)%p Local port on which this request was received%q Query string (prepended with a '? ' if it exists)%r First line of the request (method and request URI)%s HTTP status code of the response%S User session ID%t Date and time, in Common Log format%u Remote user that was authenticated (if any)%U Requested URL path%v Local server name%D Time taken to process the request, in milliseconds%T Time taken to process the request, in seconds%I Current request thread name (can compare later with stack t

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report