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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user