on 2014 Jan 28 9:02 AM
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:
E. 01/25 05:00:49. Handler for event 'iqx_updateLapsed' caused SQLSTATE '23W01'
E. 01/25 05:00:49. Primary key for table 'contactevent' is not unique : Primary key value (''MG49000525012014004A'')
E. 01/26 05:00:46. Handler for event 'iqx_updateLapsed' caused SQLSTATE '23W01'
E. 01/26 05:00:46. Primary key for table 'contactevent' is not unique : Primary key value (''MG460005260120140068'')
I. 01/26 05:56:37. Starting checkpoint of "IQX" (pears.db) at Sun Jan 26 2014 05:56
I. 01/26 05:56:46. Finished checkpoint of "IQX" (pears.db) at Sun Jan 26 2014 05:56
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!
Request clarification before answering.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
FWIW: Here's another link on that topic:
User | Count |
---|---|
66 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.