⏱️Sending logs
Start sending logs to Minilog in 5 minutes
1️⃣ Create a project
Go to your projects page and click the button + Create Project
Give it a unique short name (lowercase letters, digits, and the characters '.', '_', and '-')
2️⃣ Create a project token
After creating your first project, go to Settings > Tokens
Give the token a unique short name then click on Create
You can now copy the token by clicking the copy button next to the token.
🎉 Send your first log
To send logs to Minilog, make an authenticated HTTP POST request to the Log API.
Check out the Log API for more details.
The HTTP request can fail (no internet, quota exceeded), make sure to handle exceptions according to your programming language.
HTTP requests can take some time to complete (a few hundred milliseconds), make sure to not block your main process while sending logs.
await fetch("https://api.minilog.dev/v1/logs/<project-name>", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <project-token>",
},
body: JSON.stringify({
application: "myapp-1",
severity: "DEBUG",
data: "This is a debug message",
metadata: { hostname: "vm-1" },
}),
});
Last updated