Log4net
  1. Log4net
  2. LOG4NET-132

Environment variables are mistakenly case sensitive on windows

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.13
    • Component/s: Core
    • Labels:
      None
    • Environment:
      Windows, .Net 3.5

      Description

      On windows, environment variables are meant to be case insensitive. Because of this, in some contexts, a special IDictionary class that lowercases all the keys is used to manipulate environment variables, specifically ProcessStartInfo.EnvironmentVariables.

      The upshot of this, for me, is that when running under the profiler I have, all the environment variables get lowercased, and my logging configuration is broken, because TEMP is now temp, and log4net is treating the environment variables in a case sensitive manner, from using Environment.GetEnvironmentVariables(), which creates a normal case sensitive Hashtable object.

      It seems that, on windows, the result of Environment.GetEnvironmentVariables() should be copied into a StringDictionary to get proper case insensitive behavior.

        Activity

        Matthew Gabeler-Lee created issue -
        Stefan Bodewig made changes -
        Field Original Value New Value
        Fix Version/s 1.2 Maintenance Release [ 12317606 ]
        Stefan Bodewig made changes -
        Fix Version/s 1.2.13 [ 12325554 ]
        Fix Version/s 1.2 Maintenance Release [ 12317606 ]
        Stefan Bodewig made changes -
        Assignee Stefan Bodewig [ bodewig ]
        Stefan Bodewig made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Stefan Bodewig
            Reporter:
            Matthew Gabeler-Lee
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development