in DiagManager/CustomDiagnostics/SQL Base/errorlogs.js [213:277]
function Split2000ErrorLog(objRS)
{
var header = new CHeader;
header.PrintHeader();
var RS = objRS;
var arrRows = new Array();
var curDateTime = "1900-01-01 12:00:00.01";
var curProcessInfo = "server";
var i = 0;
var maxTextLength=0;
RS.MoveFirst();
while (!RS.EOF)
{
var strDateTime, strProcessInfo, strErrorText;
var str= (RS(0)) +"";
var arrColumns = new Array();
var re_datetime= /^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}/;
var re_datetime_serverspid=/^[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}.[0-9]{2}\s+\w+\s+/;
strDateTime = str.match (re_datetime) ;
//handle some lines that don't have datetime
var cont = "";
if (strDateTime == null || strDateTime == "")
{
strDateTime = curDateTime;
strProcessInfo = curProcessInfo;
strErrorText = str;
cont="1";
}
else
{
strDateTime = strDateTime + "";
strErrorText = str.replace(re_datetime_serverspid, RegExp.$1, "") + "";
strErrorText = trim (strErrorText);
var strTemp = trim(str.match(re_datetime_serverspid) + "");
strProcessInfo = trim(strTemp.replace(re_datetime, RegExp.$1, "") + "");
curDateTime = strDateTime;
curProcessInfo=strProcessInfo;
}
printRecord (strErrorText, curDateTime, curProcessInfo, cont);
RS.MoveNext();
}
RS.close();
return arrRows;
}