[api] Make logger optional and off by default