Audit trail for custom button

How to add audit trail for button func can anyone help me out!!

@arokia Can you expand on what you need help with? What you are requesting is not clear.