Mapmatching log level

Hi there,

i wrote code which is using the latest graphhopper-map-matching-core, currently version 0.11.0-4. My developing environment is eclipse.

My problem is, that the logger level of map-matching is apparently set to DEBUG and the log level of graphhopper-core to INFO since my output includes

[main] DEBUG com.graphhopper.matching.MapMatching...

I figured, that i have to put log4j.xml in /src/main/ressources/, but it has no effect.

My log4.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d [%t] %-5p %c - %m%n"/>
    <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
        <param name="BufferSize" value="500"/>
        <appender-ref ref="stdout"/>
    <logger name="com.graphhopper" additivity="false">
        <level value="off" />
        <appender-ref ref="ASYNC" />
    <!-- order important otherwise we'll get a warning -->
        <priority value="info"></priority>
        <appender-ref ref="ASYNC"/>

if i run mvn dependency:build-classpath -Dmdep.outputFile=classpath.txt the file classpath.txt starts with:


Any ideas what to do so that my log4j.xml is beeing used?

Thank you!

Since 0.11 you configure logging directly in the config.yml like described here:

Thank you for that hint.

For now i copied the logback.xml from here to src/main/resources.
After my modification it does what i want (WARN instead of DEBUG).

<configuration debug="false"> 
  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> 
    <!-- encoders are  by default assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder -->
      <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>

  <root level="WARN">
    <appender-ref ref="STDOUT" />

I guess the right way through config.yml would mean to create a separate Configuration class like MapMatchingServerConfiguration?