LogErrorJson
Logs an App Error message to the error log.
Service | Operation |
---|---|
log | LOG_ERROR |
Method Parameters
Parameter | Description |
---|---|
errorMessage | The error message. |
jsonContext | JSON formatted string that will display via the context icon click. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
// S2S call: to view example, switch to the Cloud Code or Raw tab.
var errorMessage = "Test error message";
var jsonContext = {
"msg": "Test error context"
};
var logProxy = bridge.getLogServiceProxy();
var postResult = logProxy.logErrorJson(errorMessage, jsonContext);
if (postResult.status == 200) {
// Success!
}
{
"service": "log",
"operation": "LOG_ERROR",
"data": {
"errorMessage": "Test error message",
"jsonContext": {
"msg": "Test error context"
}
}
}
JSON Response
{
"status": 200,
"data": null
}