Enable logging as commandline option

This set enables setting logging with commandline option. The exact options can be queried using --help option.