logo separator

[mkgmap-dev] remainder of logging changes

From Mike Baggaley mike at tvage.co.uk on Tue Apr 13 13:33:42 BST 2021

Hi Gerd,

I don't think the text implies that you get rid of console messages if you
use a logging config file. I think the best place for any additional
information about setting up a logging file is logging.txt (which I now
notice incorrectly mentions stdout instead of stderr).

It would probably also be useful if logging.txt included a complete list of
the available loggers, as currently you need to read the source to find out
what they are.

With the update you can't display error messages in stderr, with all other
messages going to the log file. If that is something you think important
then I think the way forward is to change the DIAGNOSTIC and ECHO LogLevel
values to between WARNING and ERROR, rather than being above ERROR.
Unfortunately the logging mechanism doesn't allow a range of log levels to
be reported, only allowing filtering out those below a specified level. So
with the current levels you can output DIAGNOSTIC and ECHO messages to
sdterr and filter out other messages, but not vice-versa. Where would you
prefer the DIAGNOSTIC and ECHO levels to sit?

Cheers,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] 
Sent: 13 April 2021 07:52
To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] remainder of logging changes

Hi Mike,

reg. diagnosticmessages.patch:
My understanding of the text is that you get rid of the console messages if
you use a logging configuration file. When I try this with my existing
config file I don't see this effect because the configuration tells the
logger to also write those messages to the console.
A similar config can be found in the wiki
https://wiki.openstreetmap.org/wiki/Mkgmap/dev#Enabling_Debugging

So, what I am missing is the hint that the config file should NOT contain a
console handler.

Writing this I wonder if it is now impossible to see only error messages on
stderr when the reporting options are enabled?

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike
Baggaley <mike at tvage.co.uk>
Gesendet: Montag, 12. April 2021 17:56
An: 'Development list for mkgmap'
Betreff: [mkgmap-dev] remainder of logging changes

Hi Gerd,

Please find attached a patch with the remainder of the logging changes
(apart from CommandArgs).

There are changes to the main program so that the dates and times are only
output if mkgmap is processing one or more files.

The patch includes an update to the unit test. Note that this now takes a
little longer to run, because of having to create new processes to run some
of the tests.

BTW, were you expecting a change to diagnosticmessages.patch, or is it OK as
it stands? (I've attached a copy in case it got lost amongst all the
others.)

Cheers,
Mike




More information about the mkgmap-dev mailing list