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

Error determining the current charset

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            vlotarev Vadim Lotarev
            Votes:
            4 Vote for this issue
            Watchers:
            10 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment