Ok, found it!
I know you can specify all this logging stuff in a file (maybe its worth providing a config file with SGS?) but programatically this is what I ended up using:
// turn on detailed logging
StreamHandler streamHandler = new ConsoleHandler();
streamHandler.setLevel(Level.ALL);
streamHandler.setFilter(new Filter() {
public boolean isLoggable(LogRecord record) {
if (record.getLoggerName().startsWith("com.sun.gi")) {
return true;
}
return false;
}
});
Logger log = Logger.getLogger(""); // get root logger
log.setLevel(Level.ALL);
log.addHandler(streamHandler);
The exception comes out on FINEST on the logger com.sun.gi.utils.nio.NIOSocketManager. Mine looked like this:
03-Apr-2006 21:21:22 com.sun.gi.comm.users.protocol.impl.BinaryPktProtocol packetReceived
FINER: Recieved op: JOINED_CHAN
03-Apr-2006 21:21:22 com.sun.gi.comm.users.protocol.impl.BinaryPktProtocol packetReceived
FINER: DataSize: 35
03-Apr-2006 21:21:23 com.sun.gi.utils.nio.NIOSocketManager handleRead
FINER: THROW
java.lang.RuntimeException: Unable to load image: res/broke-turret.gif
at org.newdawn.tank.client.Util.loadImage(Util.java:20)
I think this type of exception is way more important than FINER - infact, I’d probably put this up at ERROR - at least WARNING.
Kev