Both sides previous revision
Previous revision
Next revision
|
Previous revision
Last revision
Both sides next revision
|
tutorial:adm:server_preparation_win [2021/12/10 17:00] urbanl [Tomcat] |
tutorial:adm:server_preparation_win [2021/12/14 09:25] urbanl [Change Tomcat logging properties] |
For roles and advanced management configuration, please see the relevant chapters in the [[.:server_preparation|Server Preparation - Linux]] tutorial. | For roles and advanced management configuration, please see the relevant chapters in the [[.:server_preparation|Server Preparation - Linux]] tutorial. |
| |
==== Change Tomat logging properties ==== | ==== Change Tomcat logging properties ==== |
| |
In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . | In order to set-up log rotation we need stop logging to stdout and start logging to catalina.log . |
| |
After change of these tomcat setting and setting-up **logback-spring.xml** in[[.:czechidm_installation_win#create_czechidm_configuration|create_czechidm_configuration]] IdM will log into catalina.out and after day rotate it into catalina.YYYY-MM-DD.log. Tomcat engine will log into tomcat.log and no totate because there are only log of tomat start. Tomcat will log logs of IdM connectors into tomcat-stdout tomcat9-stdout.YYYY-MM-DD.log - it's well knows bug with workaround to make manual log rotation. | After change of these tomcat setting and setting-up **logback-spring.xml** in [[.:czechidm_installation_win#create_czechidm_configuration|create_czechidm_configuration]] IdM will log into catalina.out and after day rotate it into catalina.YYYY-MM-DD.log. Tomcat engine will log into tomcat.log and no totate because there are only log of tomat start. Tomcat will log logs of IdM connectors into tomcat-stdout tomcat9-stdout.YYYY-MM-DD.log - it's well knows bug with workaround to make manual log rotation. |
| |
Make these changes in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties'': Comment out console handler. We don't want tomcat to log to stdout or stderr and other unnesesary logs. | Make these changes in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\logging.properties'': Comment out console handler. We don't want tomcat to log to stdout or stderr and other unnesesary logs. |
</code> | </code> |
| |
Then in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\sever.xml'' remove creation of access logs. Coment out org.apache.catalina.valves.AccessLogValve.'' '' | Then in file ''C:\Program Files\Apache Software Foundation\Tomcat 9.0\conf\server.xml'' remove creation of access logs. Coment out org.apache.catalina.valves.AccessLogValve.'' '' |
<code> | <code> |
<!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" | <!-- <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" |
prefix="localhost_access_log" suffix=".txt" | prefix="localhost_access_log" suffix=".txt" |
pattern="%h %l %u %t "%r" %s %b" /> --> | pattern="%h %l %u %t "%r" %s %b" /> --> |
| |
</code> | </code> |