logger: cleanup refactor for inspect method