Hi All-
How do I log incoming request to the Grizzly container? I've searched hi
and low for this. Any direction would be appreciated.
Thanks,
Kevin
My code
public class GrizzlyJersey {
/**
* @param args the command line arguments
*/
private static URI getBaseURI() {
return UriBuilder.fromUri("
http://localhost/").port(8080).build();
}
private final static Logger LOGGER =
Logger.getLogger(GrizzlyJersey.class .getName());
public static final URI BASE_URI = getBaseURI();
protected static HttpServer startServer() throws IOException {
final Map<String, String> initParams = new HashMap<String,
String>();
initParams.put("com.sun.jersey.config.property.packages",
"com.frk.grizzlyjersey");
System.out.println("Starting grizzly...");
return GrizzlyWebContainerFactory.create(BASE_URI, initParams);
}
public static void main(String[] args) throws IOException {
HttpServer httpServer = startServer();
LOGGER.setLevel(Level.ALL);
System.out.println(String.format("Jersey app started with WADL
available at "
+ "%sapplication.wadl\nTry out %shelloworld\nHit enter to
stop it...",
BASE_URI, BASE_URI));
System.in.read();
httpServer.stop();
}
}