public static str getInfoLog()
{
str error;}
int fromLine = Global::infologLine();
info("this is an infolog");
error = RetailTransactionService::getInfologMessages(fromLine);
info(strfmt('error: %1', error));
or you can use below method.
public static str getInfoLog() {
str infoMsg;}
container infologCon, infoline;
str msg;
str hURL;
int i;
;
// Get the infolog data and clear the messages (cut)
infologCon = infolog.cut();
for(i=1; i<=conLen(infologCon); i++)
{
infoline = conPeek(infologCon, i);}
//exception = conPeek(infoline, 1);
msg = conPeek(infoline, 2);
hURL = conLen(infoline) > 2 ? conPeek(infoline, 3) : "";
if ( strLen(strAlpha(msg)) > 2 )
{
infoMsg = infoMsg + strFmt("Prefix: %1; Message: %2\n",}
// replace the \t by / so we can see all prefixes
strReplace(msg, '\t', '/'),
// copy the message from the last occurance of the \t to the end
subStr(msg,
strScan(msg, '\t',
strLen(msg),
-strLen(msg)) + 1,
strLen(msg)));
//if(conLen(infoline) > 3 && conPeek(infoline, 4))
//{
//actionClassName = classId2Name(conPeek(infoline, 4));
//actionClassOptions = conPeek(infoline, 5);
//}
//info(strFmt("Type: %1; Prefix: %2; Message: %3",
//exception,
//// replace the \t by / so we can see all prefixes
//strReplace(msg, '\t', '/'),
//// copy the message from the last occurance of the \t to the end
//subStr(msg,
//strScan(msg, '\t',
//strLen(msg),
//-strLen(msg)) + 1,
//strLen(msg))));
return infoMsg;
No comments:
Post a Comment