Refactoring for Log API