Uploaded image for project: 'Log4net'
  1. Log4net
  2. LOG4NET-526

Add appSetting conversion pattern to PatternString

Agile BoardAttach filesAttach ScreenshotVotersStop watchingWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.2.15
    • 2.0.6
    • Core
    • None

    Description

      A common requirement is to be able to define a base directory for log files that can be used by multiple FileAppenders. In this way, the directory only needs to be changed in one place.

      Today the typical solution is to use a PatternString with a property that is set in code before log4net is configured, e.g.

      <file type="log4net.Util.PatternString" value="%property

      {LogDIr}MyFile.log"/>

      Suggested feature is to allow a conversion pattern that reads the base directory name from an appSetting, e.g.:

      <file type="log4net.Util.PatternString" value="%appSetting{LogDIr}

      MyFile.log"/>

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            joejoe Joe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Stop watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment