set up logging and logrotate