Skip to content

Latest commit

 

History

History
82 lines (62 loc) · 1.63 KB

File metadata and controls

82 lines (62 loc) · 1.63 KB

📊 Seq Guide

DevPods includes Seq for structured log search and analysis. Seq is perfect for debugging distributed systems and complex application logic.

Connection Details

Node.js Usage

Using winston and the Seq transport.

Installation

npm install winston @datalust/winston-seq

Reference Implementation

import winston from "winston";
import { SeqTransport } from "@datalust/winston-seq";

const logger = winston.createLogger({
  level: "info",
  transports: [
    new SeqTransport({
      serverUrl: "http://localhost:5341",
      onError: (e) => console.error(e),
      handleExceptions: true,
      handleRejections: true,
    }),
  ],
});

// Structural logging example
logger.info("User Logged In", {
  UserId: 123,
  IpAddress: "127.0.0.1",
  AppVersion: "1.0.0",
});

NestJS Usage

Integrated with NestJS logging.

Installation

npm install @datalust/winston-seq nest-winston winston

Configuration (main.ts)

import { NestFactory } from "@nestjs/core";
import { WinstonModule } from "nest-winston";
import { SeqTransport } from "@datalust/winston-seq";

async function bootstrap() {
  const app = await NestFactory.create(AppModule, {
    logger: WinstonModule.createLogger({
      transports: [
        new SeqTransport({
          serverUrl: "http://localhost:5341",
        }),
      ],
    }),
  });
  await app.listen(3000);
}

Useful Commands

# Check Seq logs (container internal)
podman logs -f dev-seq-pod-seq