How to set Log Level for WaySegmentParser?

The log level seems to be set to DEBUG by default. During import, the log is flooded with messages like this:

12:26:29.478 [main] DEBUG com.graphhopper.reader.osm.WaySegmentParser - OSM node 10629475875 at 49.6156434,11.1209882 is a barrier node at a junction. The barrier will be ignored

I would like to set the log level for this compent to INFO, but I can’t figure out how to achieve this. I am configuring everything from Java, so I do not have a config file and a code based method would be preferred. I already tried creating some config files, following instructions in forum posts and in the logback manual, but they had no effect. The latest similar forum post I found is from 2018, so the advice might also be outdated.

Can anyone give me an example on how the get the WaySegmentParser adjusted?

By default you change this in the config: https://github.com/graphhopper/graphhopper/blob/master/config-example.yml#L253

Via Java you can configure logging with an xml config file like we do here for the tests or look into the internet on how to configure this (logback) directly in Java.

I tried such a config file, but without any effect. Where do I need to put it so that it is recognized? Do I need some command or environment variable?

Ok solved it.
For others with the same question: The file must be located in the class path.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.