Implemented custom logging method.