touchdesigner-mcp-server
Version:
MCP server for TouchDesigner
25 lines (24 loc) • 855 B
JavaScript
import { inspect } from "node:util";
/**
* Console Logger implementation
*
* Outputs to stderr to avoid interfering with stdio transport.
* The MCP logging capability is deprecated as of protocol revision 2026-07-28
* (SEP-2577); stderr logging is the suggested migration path.
*/
export class ConsoleLogger {
sendLog(args) {
const timestamp = new Date().toISOString();
const level = args.level?.toUpperCase() || "INFO";
const logger = args.logger || "unknown";
const data = typeof args.data === "string"
? args.data
: inspect(args.data, {
breakLength: Number.POSITIVE_INFINITY,
compact: true,
customInspect: false,
depth: null,
});
console.error(`[${timestamp}] [${level}] [${logger}] ${data}`);
}
}