Вы можете легко сделать это наследовать от SimpleRemoteLogHandler
и переопределить его isLoggable
методом, например:
@Override
public boolean isLoggable(LogRecord record) {
return super.isLoggable(record) && record.getLevel() == Level.SEVERE;
}
Затем в файле .gwt.xml
для вашего модуля вы настроите GWT для заменыSimpleRemoteLogHandler
со своим.Это будет работать, потому что GWT использует GWT.create
для его создания.
<replace-with class="com.package.YourSimpleRemoteLogHandler">
<when-type-is class="com.google.gwt.logging.client.SimpleRemoteLogHandler" />
<any>
<when-property-is name="gwt.logging.enabled" value="TRUE" />
<when-property-is name="gwt.logging.simpleRemoteHandler" value="ENABLED" />
</any>
</replace-with>