add logging feature