Log4net
  1. Log4net
  2. LOG4NET-290

Add Lambda-based ILog-Extensions (embedded log.IsEnabled)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.10
    • Fix Version/s: 1.2.12
    • Component/s: Core
    • Labels:
      None

      Description

      This statement:
      if (log.IsDebugEnabled) log.DebugFormat("x:

      {0}", 123)

      Could be nicely shortened to:
      log.Debug( m=>m("value= {0}

      ", obj.Value) );

      I'm already apache committer (NPanday Incubator Project) and would be happy to help with this interface. The simplest thing would be to offer it as static Extension-Methods to ILog.

      1. LOG4NET-290.patch
        18 kB
        Dominik Psenner
      2. LOG4NET-290-doc.patch
        63 kB
        Pavel Nedoma

        Issue Links

          Activity

          Lars Corneliussen created issue -
          Lars Corneliussen made changes -
          Field Original Value New Value
          Description {code}
          if (log.IsDebugEnabled) log.DebugFormat("x: {0}", 123)
          {code}

          Could be nicely shortened to:
          {code}
            log.Debug( m=>m("value= {0}", obj.Value) );
          {code}

          I'm already apache committer (NPanday Incubator Project) and would be happy to help with this interface. The simplest thing would be to offer it as static Extension-Methods to ILog.
          This statement:
              if (log.IsDebugEnabled) log.DebugFormat("x: {0}", 123)

          Could be nicely shortened to:
              log.Debug( m=>m("value= {0}", obj.Value) );

          I'm already apache committer (NPanday Incubator Project) and would be happy to help with this interface. The simplest thing would be to offer it as static Extension-Methods to ILog.
          Stefan Bodewig made changes -
          Fix Version/s 3.5 [ 12317610 ]
          Fix Version/s 1.2.11 [ 12310980 ]
          Dominik Psenner made changes -
          Attachment ILog.cs.patch [ 12578183 ]
          Dominik Psenner made changes -
          Attachment LOG4NET-290.patch [ 12578210 ]
          Dominik Psenner made changes -
          Attachment ILog.cs.patch [ 12578183 ]
          Dominik Psenner made changes -
          Attachment LOG4NET-290.patch [ 12578210 ]
          Dominik Psenner made changes -
          Attachment LOG4NET-290.patch [ 12578211 ]
          Pavel Nedoma made changes -
          Attachment LOG4NET-290-doc.patch [ 12580840 ]
          Dominik Psenner made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Dominik Psenner [ nachbarslumpi ]
          Fix Version/s 1.2.12 [ 12318546 ]
          Fix Version/s 3.5 [ 12317610 ]
          Resolution Fixed [ 1 ]
          Dominik Psenner made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Dominik Psenner made changes -
          Link This issue supercedes LOG4NET-217 [ LOG4NET-217 ]

            People

            • Assignee:
              Dominik Psenner
              Reporter:
              Lars Corneliussen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development