Change API log to using decorators