Added log function callback