From: andrea a. <and...@gm...> - 2012-04-19 12:06:34
|
Hi Jody, in the end I finished up removing all handlers: Logger l0 = Logger.getLogger(""); Handler[] handlers = l0.getHandlers(); for( Handler handler : handlers ) { l0.removeHandler(handler); } The real problem is that this doesn't remove some messages. Those are related to imageio-ext, not jai (seems to me at least). Is there any way to get them also to be silent? What is imageio-ext using for the logging? Thanks, Andrea On Thu, Apr 19, 2012 at 1:21 PM, Jody Garnett <jod...@gm...> wrote: > Hi Andrea - on IRC you were having some trouble with the java logging stuff > (used by a couple of the libraries such as GeoTools). > > Aside: I note that the trouble with JAI spitting out an error messages does > not seem to be related to logging. Basically we can use the pure java JAI > jars; or expect them to print a message when they fail to find their library > on the library path. > > Back to logging - apparently there is a -D command line setting that can be > used: > > java.util.logging.config.file=/path/to/app.properties > > We could that add that to our VM Args for uDig - perhaps asking it to pick > up a java logging properties file in the uDig application directory? > > Note this is a general solution for configuring java logging; for GeoTools > you can actually configure it to use different logging engines (log4j, sl4j > etc…) using some method on the GeoTools class. > > [1] http://stackoverflow.com/questions/960099/how-to-set-up-java-logging-using-a-properties-file-java-util-logging > > -- > Jody Garnett > |