# Seq

This tutorial shows you how you can configure Seq logger with Ts.ED. Seq is centralized structured logs for NodeJS, .NET, Java etc.

# Installation

Run this command to install required dependencies by @tsed/seq:

npm install --save @tsed/seq
1

Then add the following configuration in your Server:

import {Configuration} from "@tsed/common";
import "@tsed/seq"; // import seq Ts.ED module

@Configuration({
  seq: {
    serverUrl: "http://localhost:5341" // url props works also
  }
})
export class Server {}
1
2
3
4
5
6
7
8
9

Note

Seq module uses the @tsed/logger (opens new window) as a default system logger

Note

Seq module uses the log level from the LoggerSettings (default level is debug)

# Example

import {Controller, Get, QueryParams} from "@tsed/common";
import {$log} from "@tsed/logger";

@Controller("/calendars")
export class Calendar {
  @Get("/:id")
  async getCalendar(@QueryParams("id") id: string): Promise<CalendarModel> {
    $log.info(id);
  }
}
1
2
3
4
5
6
7
8
9
10

Then we should see the log in the Seq panel (by default localhost:5341)

# Author

    # Maintainers

      Last Updated: 2/22/2022, 7:43:16 AM

      Other topics