tomcat: how can we log user name in tomcat log?

前端 未结 2 1144
耶瑟儿~
耶瑟儿~ 2021-01-22 12:12

I have tried uncomment the valve line in the server.xml. The uncommented lines are



        
2条回答
  •  无人及你
    2021-01-22 12:13

    You have selected the "common" pattern ; you need to specify a custom pattern like the one shown below. The "%u" variable stands for "authenticated user". The link below lists all the other variables you can use.

    http://tomcat.apache.org/tomcat-7.0-doc/config/valve.html#Access_Log_Valve

        
    

提交回复
热议问题