Thank you very much. David Delbecq! I think I can solve it with log4j**.
2008/1/12, David Delbecq <[EMAIL PROTECTED]>: > > Well technically, tomcat does not write to catalina.out, it writes by > default to standard output. The startup script does a redirect of tomcat > stdout and stderr to catalina.out using the '>' operator. > > Now, on unix system, when a file is opened and a handle is retrieved > (here by invoking shell cause of '>'), if you rename / move the file in > filesystem, the opened handler follow it. Physically, despite the move > it's still the same file, you just renamed it. If you want control of > tomcat output, you should follow rules here, that describe out to setup > tomcat log facilities (to avoid using of stdout). > > http://tomcat.apache.org/tomcat-5.5-doc/logging.html > > As for signal, since it's the jvm that intercept signals, tomcat has no > use of it. The only usefull signal in jvm is QUIT, which forces jvm to > dump thread as debugging information. > > > latteye a écrit : > > I have a question of separate tomcat logfile catalina.out. > > > > I use newsyslog to create a new catalina.out every midnight. And the old > log > > file move to catalina.out.0. > > But Tomcat always write the log to the old file catalina.out.0. Unless > I > > restart my tomcat, it will write the log to new file which newsyslog > > created. > > > > It's not a good idea to restart tomcat with crontab everynight. > > > > And I had tried to send a sighup to tomcat process with cmd : kill -HUP > pid. > > It shutdown. > > > > I wanna find a way to make tomcat write log to new logfile ,so newsyslog > can > > work. > > > > Thanks. > > > > > > > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- 袁昊洋 *************************************** 上海摩比源软件技术有限公司 地址:上海市西藏南路218号永银大厦701室 电话:021-63343372 邮编: Email:[EMAIL PROTECTED] ***************************************