Log4j 2
  1. Log4j 2
  2. LOG4J2-186

log4j configuration fails when reading configuration file with underlying operation system encoding-language settings

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta3
    • Fix Version/s: 2.0-beta4
    • Component/s: Configurators
    • Labels:
      None
    • Environment:

      os: red-hat server

      Description

      we have red-hat application servers with locale settings set to turkish ("tr", "TR").
      in our log4j-config.xml file we have somme loggers with levels = info.
      when log4j reads this file it converts it to İNFO (with uppercase İ which is the case in turkish) and some ecxeptions occurs and log4j cannot succesfully configures.

      i attached the file we use.

      1. log4j2-config.xml
        1 kB
        fatih guleryuz

        Activity

        Hide
        Noel Grandin added a comment -

        Ah yes, the casing problem

        The fix for this would to search the LOG4J code for calls to toUpperCase() and toLowerCase(), and to make sure that the ones dealing with non-locale-specific data are doing this:

        toUpperCase(Locale.ENGLISH)
        toLowerCase(Locale.ENGLISH)

        For most applications, this means all of the calls, since toUpperCase() and toLowerCase() are almost never used on anything locale-specific.

        Show
        Noel Grandin added a comment - Ah yes, the casing problem The fix for this would to search the LOG4J code for calls to toUpperCase() and toLowerCase(), and to make sure that the ones dealing with non-locale-specific data are doing this: toUpperCase(Locale.ENGLISH) toLowerCase(Locale.ENGLISH) For most applications, this means all of the calls, since toUpperCase() and toLowerCase() are almost never used on anything locale-specific.
        Hide
        Gary Gregory added a comment -

        This was fixed a long time ago (11/4/2012) and is in Beta4.

        Show
        Gary Gregory added a comment - This was fixed a long time ago (11/4/2012) and is in Beta4.

          People

          • Assignee:
            Unassigned
            Reporter:
            fatih guleryuz
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 24h
              24h
              Remaining:
              Remaining Estimate - 24h
              24h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development