Skip to content
Back to skills

Orpc Pino

ASecurity

Integrate oRPC with Pino for structured logging and request tracking.

  • 8 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 12, 2026
developmentbashgitapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add ali-master/skills --skill orpc-pino --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Orpc Pino?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Orpc Pino
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ali-master-orpc-pino/badge)](https://www.skillsdirectory.com/skills/ali-master-orpc-pino)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oRPC Pino Integration
description: Integrate oRPC with Pino for structured logging and request tracking.
license: MIT
metadata:
  author: Ali Torki
  homepage: https://github.com/ali-master
  version: "1.0.0"
---

# Pino Integration

[Pino](https://getpino.io/) is a fast and lightweight JSON logger.

## Installation

```sh
npm install @orpc/experimental-pino@latest pino@latest
```

## Setup

```ts
import { LoggingHandlerPlugin } from '@orpc/experimental-pino'
import pino from 'pino'

const logger = pino()

const handler = new RPCHandler(router, {
  plugins: [
    new LoggingHandlerPlugin({
      logger,
      generateId: ({ request }) => crypto.randomUUID(),
      logRequestResponse: true,
      logRequestAbort: true,
    }),
  ],
})
```

> For development, use [pino-pretty](https://github.com/pinojs/pino-pretty):

```bash
npm run dev | npx pino-pretty
```

## Using the Logger

```ts
import { getLogger, LoggerContext } from '@orpc/experimental-pino'

interface ORPCContext extends LoggerContext {}

const procedure = os
  .$context<ORPCContext>()
  .handler(({ context }) => {
    const logger = getLogger(context)

    logger?.info('Processing request')
    logger?.debug({ userId: 123 }, 'User data')

    return { success: true }
  })
```

## Custom Logger per Request

Useful when integrating with [pino-http](https://github.com/pinojs/pino-http):

```ts
import {
  CONTEXT_LOGGER_SYMBOL,
  LoggerContext,
  LoggingHandlerPlugin
} from '@orpc/experimental-pino'

const logger = pino()
const httpLogger = pinoHttp({ logger })

interface ORPCContext extends LoggerContext {}

const handler = new RPCHandler(router, {
  plugins: [new LoggingHandlerPlugin({ logger })],
})

const server = createServer(async (req, res) => {
  httpLogger(req, res)

  const { matched } = await handler.handle(req, res, {
    prefix: '/api',
    context: {
      [CONTEXT_LOGGER_SYMBOL]: req.log,
    },
  })

  if (!matched) {
    res.statusCode = 404
    res.end('Not Found')
  }
})
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.