I want to be able to give admin users a warning when errors that might not otherwise be see (eg errors generated by events) are logged. I thought about filtering the server messages for errors. When server messages are written to a log file, they are nicely categorised with a message type indicator at the beginning of the line:
However that indicator isn't present when server messages are retrieved using the property('Message',n) or property('MessageText',n) functions. The exact text used to indicate the error is hard to predict and it is particularly difficult to get the additional information (eg the second line in the messages above). Is there, or could there be, a way of retrieving the indicator as well? I could grep the output file - but that does seem a bit of a round about way of doing it! asked 28 Jan '14, 09:02 Justin Willey |
Take a look at the sa_server_messages system procedure - it contains all of the information that you need including message severity (INFO, WARN, ERR) answered 28 Jan '14, 09:09 Mark Culp perfect - thank you! (I was used to the old get_server_messages function)
(28 Jan '14, 09:25)
Justin Willey
Replies hidden
FWIW: Here's another link on that topic:
(28 Jan '14, 09:36)
Volker Barth
|