ℹ️Logs
To create a log using the Logs API, send a POST request to the API endpoint.
Last updated
To create a log using the Logs API, send a POST request to the API endpoint.
Last updated
{
"level": "fatal",
"message": "Something went wrong in the server",
"resource": "core",
"metadata": {
"server": "Primary",
"team": "unknown"
}
}const axios = require('axios');
const data = {
"level": "fatal",
"message": "Something went wrong in the server",
"resource": "core", // optional
"metadata": { // optional
"server": "Primary",
"team": "unknown"
}
}
const config = {
method: 'post',
url: 'https://api.fivemerr.com/v1/logs',
headers: {
'Content-Type': 'application/json',
'Authorization': '••••••'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});