Setup logging on startup

We log to stderr by default, which is good for testing, and provide
configuration parameter write logs to a file.

Change-Id: I9101425e4fe7af434844aa52ea27f6d5bd082b97