Add logging

Per the discussion in #97, this adds a log of logging to what's going on.  It does so in a conservative way, in that no behavior will change without taking extra steps.  Will comment on a few specific things in the pull request.