@tyomll/backlog-sdk
v1.0.3
Published
Node.js SDK for Backlog logs API
Readme
Backlog Node.js SDK
Install
npm install @tyomll/backlog-sdkUsage
Send logs (Bearer JWT)
import { BacklogClient } from "@tyomll/backlog-sdk";
const client = new BacklogClient({
baseUrl: "https://backlog-backend-fllf.onrender.com",
auth: { type: "bearer", token: "YOUR_JWT" },
});
await client.sendLog({
level: "INFO",
message: "User signed in",
service: "my-app",
meta: { userId: "123" },
});Send logs with project scope
const client = new BacklogClient({
baseUrl: "https://backlog-backend-fllf.onrender.com",
auth: {
type: "bearer",
token: "YOUR_JWT",
projectToken: "YOUR_PROJECT_TOKEN",
},
});
await client.sendLog({ message: "Deploy started", service: "api" });Types
LogIngest– payload forsendLog/sendLogsLog– log entity returned by the APIBacklogApiError– thrown on non-2xx responses (.status,.message)
