Send your logs using either our using Rest API /logs
endpoint.
Create an endpoint URL by inputting your Coralogix account domain as follows: https://api.<domain>/api/v1/logs.
For example, if your data is hosted in India, your endpoint URL should appear as https://api.app.coralogix.in/api/v1/logs.
URL | https://api.<domain>/api/v1/logs. |
HTTP Method | POST |
Content-Type | application/json |
Required | Property Name | Property Type | Note |
---|---|---|---|
Yes | privateKey | UUID | |
Yes | applicationName | string | usually used to separate environments |
Yes | subsystemName | string | usually used to separate components |
computerName | string | ||
Yes | logEntries | array of logs |
Required | Property Name | Property Type | Notes |
---|---|---|---|
Yes | timestamp | number | UTC milliseconds since 1970 (supports sub millisecond via a floating point) |
Yes | severity | number | 1 – Debug, 2 – Verbose, 3 – Info, 4 – Warn, 5 – Error, 6 – Critical |
Yes | text | string | |
hiResTimestamp | string | UTC nanoseconds since 1970 (supports millisecond, microsecond and nanosecond) |
|
className | string | ||
methodName | string | ||
threadId | string | ||
category | string |
curl --location --request POST 'https://api.coralogix.com/api/v1/logs' \
--header 'Content-Type: application/json' \
--data-raw '{
"privateKey": "ec78a5b6-a3f7-289a-f44d-9f316e38d369",
"applicationName": "*insert desired application name*",
"subsystemName": "*insert desired subsystem name*",
"computerName": "*insert computer name*",
"logEntries": [
{
"timestamp": 1675148539123.342,
"severity": 3,
"text": "this is a normal text message",
"category": "cat-1",
"className": "class-1",
"methodName": "method-1",
"threadId": "thread-1"
}, {
"hiResTimestamp": "1675148539789123123",
"severity": 5,
"text": "{\"key1\":\"val1\",\"key2\":\"val2\",\"key3\":\"val3\",\"key4\":\"val4\"}",
"category": "DAL",
"className": "UserManager",
"methodName": "RegisterUser",
"threadId": "a-352"
}]}'
Note:
timestamp
, use milliseconds or microseconds. If not sent in timestamp
, we will inject the UTC time at the time the request is received.View your logs, with all metadata fields, in your Coralogix dashboard.
Need help?
Our world-class customer success team is available 24/7 to walk you through your setup and answer any questions that may come up.
Feel free to reach out to us via our in-app chat or by sending us an email at [email protected].