sp_altermessage (Transact-SQL)
SQL Server 2012
Alters the state of user-defined or system messages in an instance of the SQL Server Database Engine. User-defined messages can be viewed using the sys.messages catalog view.
The effect of sp_altermessage with the WITH_LOG option is similar to that of the RAISERROR WITH LOG parameter, except that sp_altermessage changes the logging behavior of an existing message. If a message has been altered to be WITH_LOG, it is always written to the Windows application log, regardless of how a user invokes the error. Even if RAISERROR is executed without the WITH_LOG option, the error is written to the Windows application log.
System messages can be modified by using sp_altermessage.