logo separator

[mkgmap-dev] Error in mkgmaps logging class?

From Mike Baggaley mike at tvage.co.uk on Mon Mar 15 16:22:27 GMT 2021

Hi Gerd, in that case I think the correct fix is:

handler.setLevel(Level.FINE);
l.setLevel(Level.SEVERE);

This would prevent the confusion when changing the handler level to give
more detail appears to have no effect, which took me some time to sort out
when I first started using a logging config file.

Cheers,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] 
Sent: 15 March 2021 14:29
To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] Error in mkgmaps logging class?

Hi Mike,

not sure if this will help users to use warning level as default. I see +500
warning messages for a single tile in my home area. Most of them are about
problems in the data, many of those data "problems" have no effect on the
map or are caused by incomplete data.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike
Baggaley <mike at tvage.co.uk>
Gesendet: Montag, 15. März 2021 14:02
An: 'Development list for mkgmap'
Betreff: Re: [mkgmap-dev] Error in mkgmaps logging class?

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:GPetermann_muenchen at hotmail.com]
Sent: 15 March 2021 08:52
To: Steve Ratcliffe <sr at parabola.me.uk>; 'Development list for mkgmap'
<mkgmap-dev at lists.mkgmap.org.uk>
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
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev




More information about the mkgmap-dev mailing list