How do I programatically stop java.util.logging? -
i'd know how programatically turn off java logging - no property files, no command line arguments etc.
i've tried:
final properties logproperties = new properties(); logproperties.put("handlers", "java.util.logging.memoryhandler"); logproperties.put(".level", "severe"); logproperties.put("java.util.logging.consolehandler.level", "severe"); final bytearrayoutputstream bytes = new bytearrayoutputstream(); logproperties.store(bytes, applicationname); new string(bytes.tobytearray()); logmanager.getlogmanager().readconfiguration(new bytearrayinputstream(bytes.tobytearray()));
but third party library (flying saucer) continues log messages regardless of do.
it doesn't matter in production, annoying in ide these console messages on show. (at future point, shall redirect logging framework...)
system.setproperty("show-config", "off"); system.setproperty("xr.util-logging.plumbing.layout.level", "off"); system.setproperty("xr.util-logging.plumbing.config.level", "off"); system.setproperty("xr.util-logging.plumbing.load.xml-entities.level", "off"); system.setproperty("xr.util-logging.plumbing.init.level", "off"); system.setproperty( "xr.util-logging.java.util.logging.consolehandler.level", "off"); system.setproperty("xr.util-logging.plumbing.exception.level", "off"); system.setproperty("xr.util-logging.plumbing.match.level", "off"); system.setproperty("xr.util-logging..level", "off"); system.setproperty("xr.util-logging.plumbing.cascade.level", "off"); system.setproperty("xr.util-logging.plumbing.load.level", "off"); system.setproperty("xr.util-logging.plumbing.css-parse.level", "off"); system.setproperty("xr.util-logging.plumbing.render.level", "off"); system.setproperty("xr.util-logging.plumbing.level", "off"); system.setproperty("xr.util-logging.plumbing.general.level", "off");
(per https://xhtmlrenderer.dev.java.net/servlets/readmsg?list=users&msgno=142)
Comments
Post a Comment