.level = INFOBut still only WARN messages were logged to the console.
com.google.sitebricks.level = FINE
Finally I realised that on the launcher dialogue panel for GWT I had to also set the level to DEBUG. But when I did that the console was flooded with GWT compile messages. This is due to a new bug in GAE's logging where it tries to use the same settings as GWT but gives you no control of the GWT part.
So I installed a simple logging handler to get around this:
Put this in app initif (isDevelopment()) { Logger.getLogger("").addHandler(new WorkaroundHander()); }public boolean isDevelopment() { return System.getProperty("com.google.appengine.runtime.environment").equals("Development"); }private static class WorkaroundHander extends Handler { public WorkaroundHander() { setFormatter(new TextLogFormatter(false)); setLevel(Level.ALL); }@Override public void publish(LogRecord record) { if (isLoggable(record)) { System.out.println(getFormatter().format(record)); } }@Override public void flush() { } @Override public void close() throws SecurityException { } }
Now I I happily see all the FINE messages that Sitebricks has for me.
No comments:
Post a Comment