Loading ...
Sorry, an error occurred while loading the content.
 

Re: [XP] Declarative Logging (PED)

Expand Messages
  • JeffGrigg
    ... I have reexamined your original post, which I assume contains the two examples you mention above:
    Message 1 of 9 , May 24 7:17 AM
      --- "MarvinToll.com" <MarvinToll@...> wrote:
      > Thanks for asking "Is there something else" to Framework
      > Declarative Logging.
      >
      > a. If one studies the two examples provided an appreciation for
      > the limited and targetted type of information provided that
      > is useful when implementing unit tests. This avoids
      > "strewing" framework code with log statements - or having the
      > console output strewn with the type of verbosity that occurs
      > when trying to set log levels that are effective across
      > multiple technologies.

      I have reexamined your original post, which I assume contains the two examples you mention above:
      http://tech.groups.yahoo.com/group/extremeprogramming/message/156566

      However, I would assert that achieving this would require log statements (calls) in a number of places in the framework code. (Or strong AOP with tight coupling to the framework code's low level implementation details.) So I would side with Ron on that point.

      I do agree with you about your claim that your logging approach will avoid cluttering the console (or log files) with unwanted extraneous detail, while enabling extreme detail where wanted. But it still appears to me that this is a solution to the problem that your people don't really know how to use the existing logging frameworks properly. The most common logging frameworks already offer all of this functionality and more -- but only if you know how to configure and operate them effectively.



      > b. ... Generally, if someone attaches their unit test and the
      > console log with Framework Declarative Logging active there
      > is a very good chance that someone in the community can
      > quickly identify or postulate a solution.

      Yes. I would kind of expect that, at a minimum. That's how things work now out on the message boards with most frameworks and libraries now.


      > Since there is a consistent set of output across and within
      > Frameworks the community gets accustomed to quick discernment.
      > We continually mature the sets of declarative log statements
      > so that they provide the key insight useful for writing unit
      > tests.

      I see the above as evidence that you have good and useful corporate standards and norms, and that you're doing an effective job of responding to feedback and improving the usefulness of the libraries over time.

      But...
    • JeffGrigg
      ... When I try to imagine how this could help with TDD, I run into some problems: First, a well-done library to be used by others should have effective
      Message 2 of 9 , May 24 7:34 AM
        > --- "MarvinToll.com" <MarvinToll@> wrote:
        >> Since there is a consistent set of output across and within
        >> Frameworks the community gets accustomed to quick discernment.
        >> We continually mature the sets of declarative log statements
        >> so that they provide the key insight useful for writing unit
        >> tests.

        --- "JeffGrigg" <jeffreytoddgrigg@...> wrote:
        > I see the above as evidence that you have good and useful
        > corporate standards and norms, and that you're doing an
        > effective job of responding to feedback and improving the
        > usefulness of the libraries over time.
        >
        > But...

        When I try to imagine how this could help with TDD, I run into some problems:

        First, a well-done library to be used by others should have effective documentation (probably including examples). It should be easy to figure out how to correctly use the library without having to run tests through it to find out how it really works. If a person has a problem using your library, and you can tell them how to correct their usage so that it works, but you can NOT point to published documentation or examples that show (the essence of) your correction, then your library is inadequately documented for 3rd party use.

        Second, if logging the parameters enables an expert to tell a beginner that the mysterious failure of the framework as caused by passing in an invalid set of parameter values, then I have to ask why the framework code did not throw an exception with a useful error message telling what combination of parameters is invalid.

        If the frameworks are failing in "mysterious" (to the new users) ways, given usage informed by documentation and examples, then I would suspect design problems in the frameworks, rather than a need for more logging and debugging tools.
      Your message has been successfully submitted and would be delivered to recipients shortly.