refactor logging bootstrap