Refactor logging

merge branch `refactor-logging` to `master`