log: add some basic logging infrastructure.