2014-04-15 4:48 GMT+04:00 Christopher Schultz <ch...@christopherschultz.net>: > All, > > I'm looking at adding startup messages to Tomcat to satisfy > https://issues.apache.org/bugzilla/show_bug.cgi?id=56401. Something like > this: > > Starting Apache Tomcat/8.0.4-dev (Mar 5 2014 10:34:35), Java HotSpot(TM) > 64-Bit Server VM, Java(TM) SE Runtime Environment, 1.7.0_51-b13, x86_64, > Mac OS X, 10.9.2 > > I thought at first, I'd add it to StandardServer.startInternal, since > that method is invoked (eventually) by both the Bootstrap and Tomcat > classes. Unfortunately, all the LifecycleListeners get notified first > that things are getting started, so there are lots of opportunities for > logs to come before that. > > Specifically, the AprLifecycleListener and protocol handlers, which are > pretty chatty on startup. > > No problem: put everything in initInternal, right? > > Nope. It looks like all the child containers get their init methods > called before initInternal gets called on the StandardServer. > > StandardServer extends LifecycleBase which defines init() to be final, > so I can't override it. Without a change to the class structure, I only > see two possibilities: > > 1. Register the first listener for lifecycle events and pay attention > > 2. Write a StartupVersionDumperLifecycleListener > > Does anyone have any comments about any of the above? Both ideas seem to > be ... stupid. Are there other options I haven't though of? >
1. I expect the info somewhere at the end, somewhere near the "Server startup in 15397 ms" line. 2. Not every project redistributing Tomcat needs this info. I think it is easier to configure a listener rather than invent a new configuration option. 3. (Maybe not for this issue) It would be useful to dump info on connectors used by Tomcat. As by default Tomcat does not fail when connectors startup fails, it might be useful to log whether those connectors have actually started. 4. I wonder whether this info will be available with "catalina.bat configtest" command. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org