logger registration api

Please review after #4.