log/log output refactor