Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-195

log4cxx-based logging prototype - v2

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Qserv
    • Labels:
      None
    • Story Points:
      15
    • Epic Link:
    • Sprint:
      DB_S14_05
    • Team:
      Data Access and Database

      Description

      This is continuation of DMTF-16570-16. Initial work (v1) was done in branch u/bchick/protolog. V2 will include comments sent by K-T and issues discussed at the Qserv meeting March 13

      + Free functions vs. a log object need to be discussed more. In
      particular, when metadata key/value pairs need to be attached, an object
      might make more sense. Avoiding the getLogger() call when no logging
      is needed (due to threshold) can be significant.

      + It's a security breach to use vsprintf() with any user-provided
      arguments. Use vsnprintf() instead so that you can check for overflow.
      (Or use stringstream or boost::format.)

      + In my prototype, I used a combination of a set of static
      log4cxx::LevelPtr variables with isEnabledFor(level) and a set of cpp
      macros to avoid the switch.

      + The return value from getLogger() shouldn't need to be cast.


      + play with hierarchical names
      + don't execute code for formatting if debug level is off
      + use shorter threadId
      + experiment with defining special python handler, intercept and redirect
      to our log4cxx-based logging

        Attachments

          Issue Links

            Activity

            Hide
            jbecla Jacek Becla added a comment -

            The prototype has been implemented (by Bill) and is available in branch u/bchick/protolog, it has been extensively reviewed several times by several people. Documentation is at https://dev.lsstcorp.org/trac/wiki/db/Qserv/ProtoLog. Next step: the prototype code will be restructured and packaged into a dedicated "log" package. Closing this issue.

            Show
            jbecla Jacek Becla added a comment - The prototype has been implemented (by Bill) and is available in branch u/bchick/protolog, it has been extensively reviewed several times by several people. Documentation is at https://dev.lsstcorp.org/trac/wiki/db/Qserv/ProtoLog . Next step: the prototype code will be restructured and packaged into a dedicated "log" package. Closing this issue.

              People

              • Assignee:
                fritzm Fritz Mueller
                Reporter:
                fritzm Fritz Mueller
                Watchers:
                Jacek Becla
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved:

                  Summary Panel