Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.11
    • Component/s: Appenders
    • Labels:
      None
    • Environment:
      Windows XP, 2000, 2003, .NET 1.0, 1.1, 2.0

      Description

      I have implemented a new PatternStringConverter which will expand the application AppUserDataPath (System.Windows.Forms.Application.UserAppDataPath). This is usefull, if you wish to log into this directory when a certain user has no write rights for the application directory.

      Here an example:

      <file type="log4net.Util.PatternString" value="%userappdatapath\Log.txt"/>

      Regards,
      André

      1. PatternString.cs
        18 kB
        André Normann
      2. UserAppDataPathPatternConverter.cs
        2 kB
        André Normann

        Activity

        André Normann created issue -
        André Normann made changes -
        Field Original Value New Value
        Attachment UserAppDataPathPatternConverter.cs [ 12358070 ]
        André Normann made changes -
        Attachment PatternString.cs [ 12358071 ]
        Hide
        Ron Grabowski added a comment -

        We would need to add a reference to System.Windows.Forms to support this.

        A better strategy might be to create a pattern converter for the System.Environment.SpecialFolder enumeration:

        %specialFolderPath

        {ApplicationData}

        which would allow access to these items:

        ApplicationData
        CommonApplicationData
        CommonProgramFiles
        Cookies
        Desktop
        DesktopDirectory
        Favorites
        History
        InternetCache
        LocalApplicationData
        MyComputer
        MyDocuments
        MyMusic
        MyPictures
        Personal
        ProgramFiles
        Programs
        Recent
        SendTo
        StartMenu
        Startup
        System
        Templates

        Show
        Ron Grabowski added a comment - We would need to add a reference to System.Windows.Forms to support this. A better strategy might be to create a pattern converter for the System.Environment.SpecialFolder enumeration: %specialFolderPath {ApplicationData} which would allow access to these items: ApplicationData CommonApplicationData CommonProgramFiles Cookies Desktop DesktopDirectory Favorites History InternetCache LocalApplicationData MyComputer MyDocuments MyMusic MyPictures Personal ProgramFiles Programs Recent SendTo StartMenu Startup System Templates
        Hide
        Ron Grabowski added a comment -

        Fixed in r606477 by adding EnvironmentFolderPathPatternConverter to allow System.Environment.SpecialFolder pattern string expansion:

        %envFolderPath

        {ApplicationData}

        %envFolderPath

        {Desktop}
        Show
        Ron Grabowski added a comment - Fixed in r606477 by adding EnvironmentFolderPathPatternConverter to allow System.Environment.SpecialFolder pattern string expansion: %envFolderPath {ApplicationData} %envFolderPath {Desktop}
        Ron Grabowski made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 1.2.11 [ 12310980 ]
        Assignee Ron Grabowski [ ron ]
        Status Open [ 1 ] Resolved [ 5 ]

          People

          • Assignee:
            Ron Grabowski
            Reporter:
            André Normann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development