Refactor duplicated #log method
Merge pull request #1126 from rylnd/refactor_logging

Refactor duplicated #log method