HI Gerd/Steve, The current code with the handler set to SEVERE and logger set to WARNING doesn't seem to make a lot of sense. Wouldn't it be better if the default handler level was FINE, so that just logger filters the messages. I think warnings should be allowed through by default as well, so suggest
handler.setLevel(Level.FINE); l.setLevel(Level.WARNING); Cheers, Mike -----Original Message----- From: Gerd Petermann [mailto:[email protected]] Sent: 15 March 2021 08:52 To: Steve Ratcliffe <[email protected]>; 'Development list for mkgmap' <[email protected]> Subject: [mkgmap-dev] Error in mkgmaps logging class? Hi Steve, Please review: I've noticed that log.isLoggable(Level.WARNING) always returns true when I don't use the -Dconfig.logging option for JRE . This is unexpected as calls to log.warn(...) don't produce any output in this case. The attached simple patch seems to fix this but I don't really understand the code. Maybe you forgot this change in http://www.mkgmap.org.uk/websvn/revision.php?repname=mkgmap&rev=233 ? In class MultiPolygonRelation we have quite a lot of methods which is meant to be skipped if logging is not enabled but because of this bug(?) the code is executed sometimes, maybe with side effects that I don't yet fully understand. Gerd _______________________________________________ mkgmap-dev mailing list [email protected] http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
