[add] logger function