move logging into its own submodule for reuse. import rpc ad r and log as l to avoid naming conflicts with stdlib packages.