Skip to content

Documentation / @agentick/gateway / LoggingPluginConfig

Interface: LoggingPluginConfig

Defined in: gateway/src/plugins/logging.ts:44

Properties

exclude?

optional exclude: string[]

Defined in: gateway/src/plugins/logging.ts:85

Skip logging for these path prefixes (middleware) or event categories (plugin)


id?

optional id: string

Defined in: gateway/src/plugins/logging.ts:46

Plugin ID (default: "logging")


logger?

optional logger: KernelLogger

Defined in: gateway/src/plugins/logging.ts:68

Pre-configured kernel logger instance. When provided, this is used directly — giving you full control over level, transport, and format.

Example

typescript
// Custom level + transport
loggingPlugin({
  logger: Logger.create({
    level: 'debug',
    transport: { target: 'pino/file', options: { destination: './http.log' } },
  }),
});

// Child of global logger with extra bindings
loggingPlugin({
  logger: Logger.child({ service: 'api-gateway' }),
});

loggerConfig?

optional loggerConfig: LoggerConfig<KernelContext>

Defined in: gateway/src/plugins/logging.ts:82

Logger configuration — creates a standalone logger with these settings. Ignored when logger is provided. When neither logger nor loggerConfig is set, falls back to Logger.for(pluginId).

Example

typescript
loggingPlugin({
  loggerConfig: { level: 'debug', prettyPrint: true },
});

Released under the ISC License.