As you are using embedded tomcat so might be you can help me.
I am starting the tomcat using
some code
tomcat.start();
some code
and
Look at catalina.sh
- it has parameter CATALINA_OUT
, saying
# CATALINA_OUT (Optional) Full path to a file where stdout and stderr
# will be redirected.
# Default is $CATALINA_BASE/logs/catalina.out
Then later in the same script, it is used like this:
"$_RUNJAVA" <....lots of other parameters among multiple lines.....> \
org.apache.catalina.startup.Bootstrap "$@" start \
>> "$CATALINA_OUT" 2>&1 &
So, as you can see, Tomcat startup script redirects stdout to the catalina.out
.
If you run Tomcat yourself, redirect its stdout elsewhere or look at LOGGING_CONFIG
parameter how to override this.