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

Log with formatting doesn't call custom renderers (IObjectRenderer)

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.2.11
    • Fix Version/s: 1.2.12
    • Component/s: Documentation
    • Labels:

      Description

      If I log an object using ILog.Info(myObject), myObjectRenderer is used. If I use ILog.InfoFormat("my object is:

      {0}

      ", myObject) then the default renderer is used.

      I spent hours trying to figure out why the default renderer was being used and then on a whim I used the non-formatted log method and everything worked correctly. At the very least I would like the documentation for this feature to specify that only the non-formatted logging methods make use of custom renderers.

        Activity

        Hide
        nachbarslumpi Dominik Psenner added a comment -

        Fixed for good

        Show
        nachbarslumpi Dominik Psenner added a comment - Fixed for good
        Hide
        nachbarslumpi Dominik Psenner added a comment - - edited

        Reopening to mark it as fixed in 1.2.12

        Show
        nachbarslumpi Dominik Psenner added a comment - - edited Reopening to mark it as fixed in 1.2.12
        Hide
        carlin.scott Carlin Scott added a comment -

        Sorry, I didn't want to take the time to figure out the section anchor for my link. Looks like you interpreted my request correctly. Thanks for improving the manual for us lazy users!

        Show
        carlin.scott Carlin Scott added a comment - Sorry, I didn't want to take the time to figure out the section anchor for my link. Looks like you interpreted my request correctly. Thanks for improving the manual for us lazy users!
        Hide
        nachbarslumpi Dominik Psenner added a comment -

        Fixed with revision 1461462

        Show
        nachbarslumpi Dominik Psenner added a comment - Fixed with revision 1461462
        Hide
        nachbarslumpi Dominik Psenner added a comment -

        I disagree on the point that the introduction should mention SDK detailed information. However, I am willing to add a note in the section http://logging.apache.org/log4net/release/manual/introduction.html#renderers

        Show
        nachbarslumpi Dominik Psenner added a comment - I disagree on the point that the introduction should mention SDK detailed information. However, I am willing to add a note in the section http://logging.apache.org/log4net/release/manual/introduction.html#renderers
        Hide
        carlin.scott Carlin Scott added a comment -

        That's technically documentation, not a manual. The manual makes no mention that the renderers are only used by one of the two logging methods. Most people will assume that they are used by both without some explicit statement to the contrary.

        Should I submit an improvement request since this is apparently only an issue with the manual.

        Show
        carlin.scott Carlin Scott added a comment - That's technically documentation, not a manual. The manual makes no mention that the renderers are only used by one of the two logging methods. Most people will assume that they are used by both without some explicit statement to the contrary. Should I submit an improvement request since this is apparently only an issue with the manual.
        Show
        nachbarslumpi Dominik Psenner added a comment - http://logging.apache.org/log4net/release/sdk/log4net.Core.LogImpl.InfoFormat_overload_5.html RTFM

          People

          • Assignee:
            nachbarslumpi Dominik Psenner
            Reporter:
            carlin.scott Carlin Scott
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development