logo separator

Logging

You can configure logging by using the Java -Dlog.config=filename option. This option uses a logging configuration file that allows you to enable and disable specific logging messages. This is useful if you want to see certain types of message that are not logged by default or choose where the messages should be written. The configuration file contains details of the handler(s) used to write the messages, parameters used to format the messages and the severity of messages that should be logged at Java package or class level, plus a default value. An example file is:

# The default level FINE, WARNING, INFO, SEVERE 
.level=SEVERE
#handlers: java.util.logging.ConsoleHandler 
handlers: java.util.logging.FileHandler java.util.logging.ConsoleHandler 
# package or class name with .level appended and then the level
uk.me.parabola.imgfmt.level=INFO
uk.me.parabola.mkgmap.build.level=INFO
uk.me.parabola.mkgmap.main.Main.level=INFO
uk.me.parabola.mkgmap.main.MapMaker.level=INFO
uk.me.parabola.mkgmap.general.RoadNetwork.level=INFO
uk.me.parabola.mkgmap.general.MapLine.level=INFO
uk.me.parabola.mkgmap.osmstyle.level=INFO
uk.me.parabola.mkgmap.reader.osm.level=INFO
uk.me.parabola.mkgmap.reader.osm.xml.level=INFO
uk.me.parabola.mkgmap.reader.osm.RestrictionRelation.level=FINE
uk.me.parabola.mkgmap.reader.osm.Restriction.level=FINE
# For ConsoleHandler
java.util.logging.ConsoleHandler.level=WARNING
java.util.logging.ConsoleHandler.formatter=uk.me.parabola.log.UsefulFormatter
# For FileHandler
java.util.logging.FileHandler.level=FINE
java.util.logging.FileHandler.encoding=UTF-8
java.util.logging.FileHandler.formatter=uk.me.parabola.log.UsefulFormatter
java.util.logging.FileHandler.limit=20000000
java.util.logging.FileHandler.count=4
java.util.logging.FileHandler.pattern=mkgmap.log
java.util.logging.FileHandler.append=false

The above example enables certain informational messages and sends them to a log file, with warning and error messages being also sent to stdout.

Further information can be found at https://docs.oracle.com/javase/8/docs/technotes/guides/logging/overview.html

Latest commits

  • mkgmap-r4506 Improve performance in combiner phase:.
    28 may 2020
  • mkgmap-r4505 Improve documentation, add hints about performance tuning (nsis-doc3.patch by Mike Baggaley).
    28 may 2020
  • mkgmap-r4504 Add robustness for length style function. Nested relations may form loops like A has member B and B has member ....
    27 may 2020
  • mkgmap-r4503 merge the nearby-POI branch which implements and documents new options --nearby-poi-rules and --nearby-poi-rules-config..
    25 may 2020
  • mkgmap-r4502 add one more method to GpxCreator which helps debugging.
    25 may 2020
See more...