feat(server): migrate all logging to pino

- Add pino with pino-pretty for structured logging
- Create root logger in index.ts with child loggers per module
- Support log level via PASEO_LOG env var and config.json
- Support log format (pretty/json) via PASEO_LOG_FORMAT and config.json
- Replace all console.* in runtime code with appropriate log levels
- Scripts use process.stdout/stderr for output
- Error logging uses correct pattern: logger.error({ err }, msg)
This commit is contained in:
Mohamed Boudra
2026-01-15 17:16:01 +07:00
parent ef853914d5
commit b8f056060f
48 changed files with 1275 additions and 887 deletions
@@ -4,8 +4,8 @@ import { buildPaseoDaemonConfigFromEnv } from "../src/server/config.js";
const config = buildPaseoDaemonConfigFromEnv();
console.log("=== agentControlMcp config ===");
console.log(JSON.stringify(config.agentControlMcp, null, 2));
process.stdout.write("=== agentControlMcp config ===\n");
process.stdout.write(JSON.stringify(config.agentControlMcp, null, 2) + "\n");
// Simulate what buildCodexMcpConfig does
const mcpServers: Record<string, unknown> = {};
@@ -23,5 +23,5 @@ mcpServers["playwright"] = {
args: ["@playwright/mcp", "--headless", "--isolated"],
};
console.log("\n=== Built MCP servers config ===");
console.log(JSON.stringify(mcpServers, null, 2));
process.stdout.write("\n=== Built MCP servers config ===\n");
process.stdout.write(JSON.stringify(mcpServers, null, 2) + "\n");