update prepareLogFn method and spec