Skip to content

Logging a message

This API sends a message string to a log file.



Endpoint URL

The is a subdomain assigned to your application. For more information see the Client-side Setup section of this documentation.

Request headers

Content-Type: application/json  
user-token: optional value obtained as a result of the login operation.


Argument                Description
Content-Type Must be set to application/json. This header is mandatory.
user-token Optional header. Contains a value returned by Backendless in a preceding user Login API call. If user-token is set in the request, the currently logged in user will be assigned to the ownerId property of the user object which is being saved.  Additionally, the operation will be executed with the security policy associated currently logged in user. This means all permissions associated with the user and the roles assigned to the user will be enforced by Backendless.

Request body

A JSON array of objects. Each object represents a log message.

    "log-level": DEBUG | INFO | TRACE | WARN | ERROR | FATAL,  
    "message": message-text-value,  

Response body

none or error


Make sure to replace xxxx in the domain name in the sample request below to the one assigned to your application.

curl -H Content-Type:application/json -X PUT \  
-v \  
-d '[{"log-level":"INFO","logger":"com.mbaas.Logger","timestamp":123456789, "message":"Starting application.." }]'

Once the example runs, the Manage > Log Management screen in the Backendless Console will show the following: