refactor for psr log