Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093521

[CSS] css code should not set logging level

XMLWordPrintable

      In the file modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java there's:

          private static final PlatformLogger LOGGER;
          static {
              LOGGER = com.sun.javafx.Logging.getCSSLogger();
              final Level level = LOGGER.level();
              if (level == null || (
                  level.compareTo(Level.WARNING) > 0 &&
                  level != Level.OFF)) {
                  LOGGER.setLevel(Level.WARNING);
              }
          }

      The consequence is that if the user of an FX app uses a logging.properties file where he writes "css.level = SEVERE" then CSS messages will anyway be logged.
      This is surprising: I didn't see the other loggers used by FX platform setting the level, which means full control is let to the end user.

      The only way to get rid of CSS messages is to set "css.level = OFF".

            dgrieve David Grieve
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: