logging: use require logging

(integrated from trunk branch change b89bc2f by Todd Whiteman <toddw@activestate.com>)