Make log level changeable at run time

Copied the patch suggested by Luc Simard on Google Groups
Time format can be set programmatically. Still defaults to %c for legacy code.