(PUP-2241) Simplify dispatching of logging functions

This uses a simpler dispatching mechanism. Not meaningful to test
against 0-infinity of Optional[Object].
Merge pull request #2535 from hlindberg/pup-2241_add-logging-functions-to-static-loader

(PUP-2241) add logging functions to static loader