...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <mc-system-alerter xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/mcSystemAlerter.xsd"> <alerts> <emailalert> <recipients> <recipient email="Some.body@somewhere.org"/> </recipients> <configuration> <smtp fromaddress="fromaddress@somewhere.org" host="smtp.somewhere.org" port="25"/> </configuration> <subject> <subjectline content="This is my subject line DATE_TIME MC_ID"/> <substitutions> <tag tagid="MC_ID"/> <tag tagid="DATE_TIME"/> </substitutions> </subject> <body value="This is the message body"/> <attachments> <attachment eventcodefilter="my event codeMyEvent.Code" loglevelthreshold="LOG_ALL" maxentrycount="100" maxlogage="15" maxsize="10" sortorder="LOCAL_AVAILABLE_TIME" xsi:type="logentriesattachmentType"> <filename includedatestamp="true" prefix="logentries"/> </attachment> <attachment maxsize="10" xsi:type="reportsattachmentType"> <filename includedatestamp="true" prefix="report"/> <reportcontents> <latestreportsselection includeselection="true"> <includes/> </latestreportsselection> <currentreportsselection includeselection="true"> <excludes/> </currentreportsselection> </reportcontents> </attachment> </attachments> </emailalert> </alerts> </mc-system-alerter> |
The result willbe that a CSV file is attached containing the relevant logentries.
Code Block |
---|
taskRunId,logEntryID,logCreationTime,logLevel,logType,logMessage,expiryTime,eventCode,moduleInstanceId,localAvailableTime,eventAcknowledged,eventProcessed
MC00:000009387,32,2015-01-08T10:42:22.000+00:00,20000,5,message1,2015-01-13T10:42:22.000+00:00,MyEvent.Code,none,2015-01-08T10:42:32.000+00:00,1
MC00:000009387,20,2015-01-08T09:49:46.000+00:00,20000,5,message2,2015-01-13T09:49:46.000+00:00,MyEvent.Code,none,2015-01-08T09:49:58.000+00:00,1
MC00:000009387,1,2015-01-08T09:43:34.000+00:00,20000,5,message3,2015-01-13T09:43:34.000+00:00,MyEvent.Code,none,2015-01-08T09:43:42.000+00:00,1 |
Warning |
---|
NB. Note that the fromaddress field will fallback to InternetAddress.getLocalAddress() which is according to specification but in rare cases will fail to provide a suitable fromaddress and will cause errors in the synchronisation_log.txt (where the MCSystemAlerter logs its errors). Including the fromaddress will resolve this matter. |
...