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

Error determining the current charset

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.8
    • Fix Version/s: 2.8.1
    • Component/s: None
    • Labels:
      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

              • Assignee:
                remkop@yahoo.com Remko Popma
                Reporter:
                vlotarev Vadim Lotarev
              • Votes:
                4 Vote for this issue
                Watchers:
                10 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: