Call this function to get an array of AppLog.LogEntry objects.
There will be one AppLog.LogEntry object for each line in the app log.
<static> getLogEntries( successCB, errorCB )
| Name | Type | Description |
| successCB | anonymous.getLogEntriesSuccessCallback | The callback function that will receive the asynchronous callback with the log entries. |
| errorCB | anonymous.getLogEntriesErrorCallback | The callback function that will be invoked on errors. |
// A global function called with the log entries.
function onLogEntriesSuccessCallback(data) {
for ( var i = 0; i < data.length; i++ )
{
var logEntry = data[ i ];
alert('Log entry ' + ( i + 1 ) + ':\
' +
'Date (ms): ' + logEntry.date + '\
' +
'Status code: ' + logEntry.statusCode + '\
' +
'Message: ' + logEntry.message
);
}
}
// A global function called if there is an error retrieving log entries.
function onLogEntriesFailureCallback(error) {
alert('Error retrieving log entries: ' + error);
}
// Get the log entries
AppLog.getLogEntries(onLogEntriesSuccessCallback, onLogEntriesFailureCallback);