Include the with_log option in sp_addmessage when you add a new user-defined message to sysusermessages. This parameter sets the SAP ASE to log the message each time the message appears.