Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-1799

Error determining the current charset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.8
    • 2.8.1
    • None
    • None

    Description

      Switching to the latest release I've immediately got the following error:

      Unable to inject fields into builder class for plugin type class org.apache.logging.log4j.core.appender.ConsoleAppender, element Consol
      e. java.nio.charset.UnsupportedCharsetException: sun.stdout.encoding
      

      In the PropertiesUtil I see the following:

          public Charset getCharsetProperty(final String name, final Charset defaultValue) {
              final String prop = getStringProperty(name);
              return prop == null ? defaultValue : Charset.forName(name);
          }
      

      Shouldn't prop be used in Charset.forName(name) instead of name?

      Attachments

        Issue Links

          Activity

            People

              rpopma Remko Popma
              vlotarev Vadim Lotarev
              Votes:
              4 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: