rather than have set_logger() and call it externally, shouldn't we move all the log setup stuff into here?