<?php
$txt = "resultCode:NoOp
errorMessage:null
processMessage:2014-08-08 02:18:01:659 INFO begin appName=ixp_app
appVersion=2012_11_v01 integrationCode= clientId=999999 userName=autosuggest1
docId=12963337 docType=RFQ recipientId=58992 encodingTypeCode=UTF-8
2014-08-08 02:18:01:659 DEBUG Opening connection to the database
2014-08-08 02:18:01:660 DEBUG Validating client's account
2014-08-08 02:18:01:668 DEBUG Reading original document details from database
2014-08-08 02:18:01:668 DEBUG Reading Header from Database
2014-08-08 02:18:01:671 DEBUG Reading Line Items from Database
2014-08-08 02:18:01:673 DEBUG Reading Party Contacts from Database
2014-08-08 02:18:01:675 DEBUG Constructing Interchange
2014-08-08 02:18:01:675 DEBUG Constructing Request For Quote
2014-08-08 02:18:01:678 DEBUG Constructing Dates
2014-08-08 02:18:01:678 DEBUG Constructing References
2014-08-08 02:18:01:678 DEBUG Constructing Comments
2014-08-08 02:18:01:679 DEBUG Constructing Parties
2014-08-08 02:18:01:679 DEBUG Constructing Line Items
2014-08-08 02:18:01:680 DEBUG Saving original document content to file - raw
2014-08-08 02:18:01:705 INFO Found 1 possible RFQ matches with a Reference No.:
14/440 that was forwarded by Match Buyer 11107 to Supplier 58992
2014-08-08 02:18:01:705 INFO RFQ with Internal Ref No.: 12884046
2014-08-08 02:18:01:706 INFO RFQ 12963337 will now be compared with the list of
possible RFQ matches
2014-08-08 02:18:01:706 INFO Comparing RFQ 12963337 with RFQ 12884046
2014-08-08 02:18:01:706 DEBUG Reading Header from Database
2014-08-08 02:18:01:708 DEBUG Reading Line Items from Database
2014-08-08 02:18:01:720 DEBUG Reading Party Contacts from Database
2014-08-08 02:18:01:727 DEBUG Constructing Interchange
2014-08-08 02:18:01:728 DEBUG Constructing Request For Quote
2014-08-08 02:18:01:730 DEBUG Constructing Dates
2014-08-08 02:18:01:730 DEBUG Constructing References
2014-08-08 02:18:01:731 DEBUG Constructing Comments
2014-08-08 02:18:01:731 DEBUG Constructing Parties
2014-08-08 02:18:01:732 DEBUG Constructing Line Items
2014-08-08 02:18:01:733 DEBUG Doc Changed on //Interchange/RequestForQuote/LineItem/@Description
2014-08-08 02:18:01:733 DEBUG Electric motor, Vertical mounted, Type- 4AP 71-45, 3phase, 440 Volts, 60 Hz, 0.29 KW, 0.8 Amp & 1656 RPM, Fan Motor,
3-phase, 440Volts, 0.8 Amp, 60 Hz, 0.29KW & RPM-1656 not equal to 2/2 way
solenoid valve- servo assisted for emergency fire pump, Maker: Burkert, Details:
5281 A 13.0 NBR, MS, G 1/2, PNO 0.2 - 16 bar, 230 V, 50-60 Hz8 W, G 1/2, PNO
0.2-16 Bar
2014-08-08 02:18:01:733 DEBUG Committing database transaction
2014-08-08 02:18:01:733 DEBUG Closing connection to the database
2014-08-08 02:18:01:734 INFO end status=NOOP
filename=999999_20140808021801_f90e96c9 elapsed=74ms
fileContents:null
";
$lines = explode(PHP_EOL, $txt);
$userMessages= array();
foreach ($lines as $line) {
//print $line . PHP_EOL . '---------' . PHP_EOL;
// regexp is 'timestamp debug_level message'
if (!preg_match(
'/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}:\d{3} \w+ (.*)$/', $line, $matches
)) {
// top lines with no timestamp, safe to skip them
continue;
}
$message = $matches[1];
$words = explode(' ', $message);
if (empty($words)) {
// single words are also skipped
continue;
}
if (in_array(strtolower($words[0]), array(
'opening',
'validating',
'reading',
'constructing',
'saving',
'found',
'rfq',
'comparing',
'committing',
'closing',
'end'
))) {
// skip know technical message
continue;
}
$userMessages[] = $message;
}
print_r($userMessages);
- Output for 4.3.10 - 4.3.11, 4.4.0 - 4.4.9, 5.0.2 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.10, 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
- Array
(
[0] => Doc Changed on //Interchange/RequestForQuote/LineItem/@Description
[1] => Electric motor, Vertical mounted, Type- 4AP 71-45, 3phase, 440 Volts, 60 Hz, 0.29 KW, 0.8 Amp & 1656 RPM, Fan Motor,
)
- Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
- Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/QZ8lk on line 53
Array
(
)
preferences:
256.69 ms | 402 KiB | 355 Q