move logging to own package