Invalid Json for save log(s)

Hello,
I’m trying to log an event with the following JSON string:
{“logger”:“my_logger”,“exception”:“No user found”,“log-level”:“ERROR”,“timestamp”:“2016-10-02 20:46:06”,“message”:""}
but I keep getting “Invalid Json for save log(s)”. I checked the documentation but all the parameters are there. What is wrong with the above JSON?

I also tried with a timestamp on the “seconds from 1970” format but it gave the same error.

Hello!
Please, look through the doc more carefully: json array of objects is expected to be passed instead of json object. Wrap your json into square brackets and repeat the request.
Hope it helps,
Alex

It did not help, I get the same error. My JSON string now looks like this:

[{"logger":"my_logger","exception":"no user found","log-level":"ERROR","timestamp":"2016-10-04 13:29:26","message":""}] 

This is the full response:

table: 0x7f823df7fff0 { 
 [isNetworkError] => false 
 [endpointType] => "log" 
Oct 04 01:29:26.923 [errorCode] => 21003 
 [errorMessage] => "Invalid Json for save log(s)." 
 [httpStatusCode] => 400 
 [networkBytesTransferred] => 56 
 [headers] => table: 0x7f823df7fff0 { 
 [Access-Control-Allow-Origin] => "*" 
 [Content-Type] => "application/json; charset=utf-8" 
 [Connection] => "keep-alive" 
 [Content-Length] => "56" 
 [Date] => "Tue, 04 Oct 2016 11:29:26 GMT" 
 [Access-Control-Allow-Headers] => "Origin, application-id, application-type, Content-Type, secret-key, request, user-token" 
 [Access-Control-Allow-Methods] => "POST, GET, OPTIONS, PUT, DELETE, PATCH" 
 [Server] => "nginx/1.8.1" 
 } 
 }

Change value for “timestamp” field to timestamp format.

Request Content-Type header must be ‘application/json’
Timestamp must be numeric unix timestamp

I changed the timestamp format to the “seconds from 1970” format (currently about 1475583247) and it worked. However, when I look into the logfile, the date is wrong:

1970-01-18 01:53:03,247 | my_logger | ERROR | : no user found

Could you please elaborate on “Change value for ‘timestamp’ field to timestamp format”? Is it not the UNIX epoch format you mean?

I’m sorry, it’s my bad. Timestamp value should be in milliseconds.

Ok, that worked, thanks!