<?php
$txt = "resultCode:NoOp
errorMessage:null
processMessage:2014-08-07 03:33:01:705 INFO begin appName=ixp_app
appVersion=2012_11_v01 integrationCode= clientId=999999 userName=autosuggest1
docId=12956633 docType=RFQ recipientId=54784 encodingTypeCode=UTF-8
2014-08-07 03:33:01:706 DEBUG Opening connection to the database
2014-08-07 03:33:01:706 DEBUG Validating client's account
2014-08-07 03:33:01:712 DEBUG Reading original document details from database
2014-08-07 03:33:01:712 DEBUG Reading Header from Database
2014-08-07 03:33:01:715 DEBUG Reading Line Items from Database
2014-08-07 03:33:01:719 DEBUG Reading Party Contacts from Database
2014-08-07 03:33:01:721 DEBUG Constructing Interchange
2014-08-07 03:33:01:721 DEBUG Constructing Request For Quote
2014-08-07 03:33:01:724 DEBUG Constructing Dates
2014-08-07 03:33:01:725 DEBUG Constructing References
2014-08-07 03:33:01:725 DEBUG Constructing Comments
2014-08-07 03:33:01:725 DEBUG Constructing Parties
2014-08-07 03:33:01:726 DEBUG Constructing Line Items
2014-08-07 03:33:01:726 DEBUG Saving original document content to file - raw
2014-08-07 03:33:01:740 INFO Found 1 possible RFQ matches with a Reference No.:
14/449 that was forwarded by Match Buyer 11107 to Supplier 54784
2014-08-07 03:33:01:740 INFO RFQ with Internal Ref No.: 12870348
2014-08-07 03:33:01:740 INFO RFQ 12956633 will now be compared with the list of
possible RFQ matches
2014-08-07 03:33:01:740 INFO Comparing RFQ 12956633 with RFQ 12870348
2014-08-07 03:33:01:740 DEBUG Reading Header from Database
2014-08-07 03:33:01:742 DEBUG Reading Line Items from Database
2014-08-07 03:33:01:744 DEBUG Reading Party Contacts from Database
2014-08-07 03:33:01:754 DEBUG Constructing Interchange
2014-08-07 03:33:01:754 DEBUG Constructing Request For Quote
2014-08-07 03:33:01:756 DEBUG Constructing Dates
2014-08-07 03:33:01:756 DEBUG Constructing References
2014-08-07 03:33:01:756 DEBUG Constructing Comments
2014-08-07 03:33:01:756 DEBUG Constructing Parties
2014-08-07 03:33:01:757 DEBUG Constructing Line Items
2014-08-07 03:33:01:758 DEBUG Doc Changed on Actual Line Item Count
2014-08-07 03:33:01:758 DEBUG 1 not equal to 7
2014-08-07 03:33:01:758 DEBUG Committing database transaction
2014-08-07 03:33:01:758 DEBUG Closing connection to the database
2014-08-07 03:33:01:759 INFO end status=NOOP
filename=999999_20140807033301_7b536076 elapsed=53ms
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 git.master, git.master_jit, rfc.property-hooks
- Array
(
[0] => Doc Changed on Actual Line Item Count
[1] => 1 not equal to 7
)
This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.
Active branches
Archived branches
Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page
preferences:
43.85 ms | 401 KiB | 8 Q