GeoServer
  1. GeoServer
  2. GEOS-1255

Make sure not even developer logging level make shapefile renderer dump down that gazillion of log statements

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.0-beta1
    • Fix Version/s: 1.6.0-beta4
    • Component/s: Configuration
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Rendering with full logging slows down a map rendering from 10s to 1800s according to a user report. This is insane

        Activity

        Hide
        Gabriel Roldan added a comment - - edited

        I'm not sure what to say/do about this.
        First, why should someone run with full logging enabled if not inside a deep debug session...
        Second, it doesn't surprises me full logging slows down rendering... that's what it does after all with all that string serialization and concatenation.

        Even though, I think the actual problem is the log4j->java,util.logging level mapping.
        That is, setting a DEBUG level on the log4j properties file enables FINE, FINER and FINEST on geotools using java logging.
        Took a deep look at the shapefile renderer logging statements and they make quite good sense to me, like the more annoying stuff is being logged in FINEST.

        So what the solution could be? we of course could limit the org.geotools.renderer.shape logger to a higher one than DEBUG for the GEOTOOLS_DEVELOPER profile, but.. that means loosing FINE and FINER too, aka, CONFIG and higher?

        suggestions?

        Show
        Gabriel Roldan added a comment - - edited I'm not sure what to say/do about this. First, why should someone run with full logging enabled if not inside a deep debug session... Second, it doesn't surprises me full logging slows down rendering... that's what it does after all with all that string serialization and concatenation. Even though, I think the actual problem is the log4j->java,util.logging level mapping. That is, setting a DEBUG level on the log4j properties file enables FINE, FINER and FINEST on geotools using java logging. Took a deep look at the shapefile renderer logging statements and they make quite good sense to me, like the more annoying stuff is being logged in FINEST. So what the solution could be? we of course could limit the org.geotools.renderer.shape logger to a higher one than DEBUG for the GEOTOOLS_DEVELOPER profile, but.. that means loosing FINE and FINER too, aka, CONFIG and higher? suggestions?
        Hide
        Andrea Aime added a comment -

        This is annoying, but it seems to me we forgot two of the log4j levels then.
        FINE -> debug
        FINER -> trace
        FINEST -> all

        Show
        Andrea Aime added a comment - This is annoying, but it seems to me we forgot two of the log4j levels then. FINE -> debug FINER -> trace FINEST -> all
        Hide
        Gabriel Roldan added a comment - - edited

        ok, so at GeoServer.log4JLevelToJDKLoggingLevel we have the following log4j->jdk logging mapping:
        DEBUG -> FINER
        INFO -> CONFIG
        WARN -> WARNING
        ERROR -> SEVERE

        The default log4j levels are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF
        (http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html)

        The default jdk levels are: ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF
        (http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html)
        CONFIG is in practice rarely used.

        What about the following mapping:
        ALL -> FINEST
        TRACE -> FINER
        DEBUG -> FINE (includes CONFIG)
        INFO -> INFO
        WARN/ERROR -> WARNING
        FATAL -> SEVERE
        OFF -> OFF

        Show
        Gabriel Roldan added a comment - - edited ok, so at GeoServer.log4JLevelToJDKLoggingLevel we have the following log4j->jdk logging mapping: DEBUG -> FINER INFO -> CONFIG WARN -> WARNING ERROR -> SEVERE The default log4j levels are: ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF ( http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html ) The default jdk levels are: ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE, OFF ( http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Level.html ) CONFIG is in practice rarely used. What about the following mapping: ALL -> FINEST TRACE -> FINER DEBUG -> FINE (includes CONFIG) INFO -> INFO WARN/ERROR -> WARNING FATAL -> SEVERE OFF -> OFF
        Hide
        Andrea Aime added a comment -

        Gabriel, that mapping looks fine for me. I've made Saul watch this issue. Since he's the one that did the original mapping, I would like to hear his opinion too. He certainly has put more thought into the level mappings than I did.

        Show
        Andrea Aime added a comment - Gabriel, that mapping looks fine for me. I've made Saul watch this issue. Since he's the one that did the original mapping, I would like to hear his opinion too. He certainly has put more thought into the level mappings than I did.
        Hide
        Gabriel Roldan added a comment -

        doing it that way seems just to make it.
        Updated the properties file to reflect that mappings, and restricted org.geotools.renderer to DEBUG instead of TRACE

        Show
        Gabriel Roldan added a comment - doing it that way seems just to make it. Updated the properties file to reflect that mappings, and restricted org.geotools.renderer to DEBUG instead of TRACE

          People

          • Assignee:
            Gabriel Roldan
            Reporter:
            Andrea Aime
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: