Logging improvements

Log warnings and errors to a separate file.
Use log4js config files.
Rotate logs daily and clean up after 7 days.

cc @BooDoo for code review.