3

I've got jetty set up to boot on login using the standard init script in CentOS 6.3 - my problem is that it decides to log a few messages to the console before redirecting it to it's own log files, which ends up printing out on the login screen.

It ends up with:

login: 20120-07-13 19:53:09.039:INFO::Redirecting stderr/stdout to /opt/jetty/logs/2012_07_13.stderrout.log

Which is rather ugly, is there any way to get rid of this?

user705142
  • 433
  • 6
  • 16

2 Answers2

1

I think I've got it - in jetty-logging.xml theres one line:

<Call class="org.eclipse.jetty.util.log.Log" name="info"><Arg>Redirecting stderr/stdout to <Ref id="ServerLogName"/></Arg></Call>

Edit that out and it stops.

user705142
  • 433
  • 6
  • 16
1

I had the same issue. The message appearing during startup is a sign indicating that you have not correctly configured jetty to run as a daemon/service during system startup. By modifying the jetty-logging.xml you are suppressing the symptom but not removing the root cause.

I assume you have simply used a variation of following command to get jetty to start at system boot:

chkconfig jetty on

To get the service to restart correctly on reboot, uncomment the 3 lines in /etc/init.d/jetty (as indicated in the startup script itself):

# ========================
# chkconfig: 3 99 99
# description: Jetty 8 webserver
# processname: jetty
# ========================

You will notice that the "ugly" logging messages at the login screen disappear.

Chris2M
  • 11
  • 1
  • 3