Logger.Logger

Package Logger :: Module Logger |
[hide private]
[frames] | no frames]

# Module Logger

source code

    Provides a Logger class which can be wrapped around another
    python class to log method calls and attribute changes.

Classes | [hide private]
| Callable this is just a simple class with a __call__ method we'll use to pass any method invocations back to the caller.
| Logger This is the actual wrapper class.

Functions | [hide private]
isPresent(what, checkList) checks to see if any of the regular expressions in a list match a string... | source code
replay(logItems, obj) loops through the items in a Logger log list and invokes... | source code

Variables | [hide private]
| stringTypes = ``[`<type 'str'>`,` <type 'unicode'>`,` <type '_sre.SRE`...``

Function Details | [hide private]

### isPresent(what, checkList) | source code
    checks to see if any of the regular expressions in a list match a string

    **Arguments**

      - what: the thing to match against

      - checkList: the list of regexps to try the match with

    **Returns**

      1 or 0 depending upon whether or not _what_ was found in checkList

    **Notes**

      - the search is done using _match_, so we match *any* part of _what_

### replay(logItems, obj) | source code
    loops through the items in a Logger log list and invokes
     them in obj

    **Arguments**

      - logItems: a list of 3 tuples containing:

         1) method name

         2) tuple of positional arguments

         3) dictionary of keyword arguments

      - obj: the object in which the log should be replayed

    **Returns**

      a list with the the return values of all the method
      invocations/attribute assignments

Variables Details | [hide private]

  ### stringTypes Value:
      [<type 'str'>, <type 'unicode'>, <type '_sre.SRE_Pattern'>]