How to redirect tomcat console to log files?
Edit bin/startup.bat and change the line:call "%EXECUTABLE%" start %CMD_LINE_ARGS%
to:
set "sydate=%Date:~0,4%-%Date:~5,2%-%Date:~8,2%"
call "%EXECUTABLE%" run >>..\logs\my_%sydate%.log 2>&1 start %CMD_LINE_ARGS% run >>..\logs\my_%sydate%.log 2>&1
Note:the variable "sydate" depends on your system.u can use the command "echo %date%" to check ,and decide to how to intercept string as your time pattern
页:
[1]