When tomcat is started and logs are output at the same time, execute startup. sh script to start tomcat. the execution result is as follows: To view the log, you have to cd it to the logs directory, and then run the tai-f command to view the log. several more steps are required. If you can output logs while executing the script, it is not... when tomcat is started and logs are output at the same time, execute startup. sh script to start tomcat. the execution result is as follows: To view the log, you have to cd it to the logs directory, and then run the tai-f command to view the log. several more steps are required. If you can output logs while executing the script, can it slightly improve the efficiency. How to set it? This is a method of laziness, which has been tested and verified in catalina. sh elif ["$1" = "start"]; if ["$1" = "-security"] in then; else eval \ "$ _ RUNJAVA \" \ "$ LOGGING_CONFIG \" $ JAVA_OPTS $ CATALINA_OPTS \-Djava in then. endorsed. dirs = \ "$ JAVA_ENDORSED_DIRS \"-classpath \ "$ CLASSPATH \" \-Dcatalina. base = \ "$ CATALINA_BASE \" \-Dcatalina. home = \ "$ CATALINA_HOME \" \-Djava. io. tmpdir = \ "$ CATALINA_TMPDIR \" \ org. apache. catalina. startup. bootstrap "$ @ "Start \>" $ CATALINA_OUT "2> & 1" & "is added with a line feed: tail-f $ {CATALINA_OUT} [plain] else eval \ "$ _ RUNJAVA \" \ "$ LOGGING_CONFIG \" $ JAVA_OPTS $ CATALINA_OPTS \-Djava. endorsed. dirs = \ "$ JAVA_ENDORSED_DIRS \"-classpath \ "$ CLASSPATH \" \-Dcatalina. base = \ "$ CATALINA_BASE \" \-Dcatalina. home = \ "$ CATALINA_HOME \" \-Djava. io. tmpdir = \ "$ CATALINA_TMPDIR \" \ org. apache. catalina. startup. bootstrap "$ @" start \> "$ CATALINA_O UT "2> & 1" & "tail-f $ {CATALINA_OUT} fi again sh startup. sh start tomcat, log output, OK, get it done!
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.