api client log function permission fix