refactor logger to use function parameters instead of ostream inserter