add logging api