Custom java.util.logging Handler in tomcat

喜你入骨 提交于 2019-11-27 02:15:47

For the Tomcat-wide custom logging you need to inject your class into the Tomcat bootstrap ClassLoader. Thus jar with custom Handler and required dependencies have to be put into the startup script CLASSPATH. I'd advice to a add custom script at $CATALINA_BASE/bin/setenv.sh, i.e.

#!/bin/sh

CLASSPATH="$CATALINA_BASE/bin/myhandler.jar"

or you can collect required jars dynamically as script variables are loaded during the Tomcat start-up.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!