← All procedures
logs.store
Store a log entry in the database
MCPCLI- Package
- @procedures/sqlite · README
- Path
["logs","store"]- CLI
mark logs store --level <"trace" | "debug" | "info" | "warn" | "error"> --message <string>- MCP tool
logs.store on the dev-tools server- As data
{"$proc":["logs","store"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/sqlite"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["logs","store"], { level: "trace", message: "<message>" });
console.log(JSON.stringify(result));From the command line
$ mark logs store --level <"trace" | "debug" | "info" | "warn" | "error"> --message <string>
As data, in a program
{
"$proc": ["logs", "store"],
"input": { "level": "trace", "message": "<message>" }
}Input
| Field | Type | Required | Default | Description |
|---|
level | "trace" | "debug" | "info" | "warn" | "error" | yes | | The level: trace, debug, info, warn or error |
message | string | yes | | The log message |
sessionId | string | no | | The session that the entry belongs to (to group entries) |
command | string | no | | The command that made the entry |
context | string | no | | More context, for example a package name |
data | object | no | | Structured data of the entry |
errorStack | string | no | | The stack trace of an error |
dbPath | string | no | | The SQLite database file (default: /home/runner/logs/cli/cli.db). A query does not make a missing file. |
Output
| Field | Type | Required | Default | Description |
|---|
id | number | yes | | The id of the new log row |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"level": {
"type": "string",
"enum": [
"trace",
"debug",
"info",
"warn",
"error"
],
"description": "The level: trace, debug, info, warn or error"
},
"message": {
"type": "string",
"description": "The log message"
},
"sessionId": {
"description": "The session that the entry belongs to (to group entries)",
"type": "string"
},
"command": {
"description": "The command that made the entry",
"type": "string"
},
"context": {
"description": "More context, for example a package name",
"type": "string"
},
"data": {
"description": "Structured data of the entry",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"errorStack": {
"description": "The stack trace of an error",
"type": "string"
},
"dbPath": {
"description": "The SQLite database file (default: /home/runner/logs/cli/cli.db). A query does not make a missing file.",
"type": "string"
}
},
"required": [
"level",
"message"
]
},
"output": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The id of the new log row"
}
},
"required": [
"id"
],
"additionalProperties": {}
}
}