mirror of
https://github.com/apricote/Listory.git
synced 2026-01-13 13:11:02 +00:00
refactor: remove unused logging setup
Pino is actually set up in src/logger/logger.ts and the variable created here is never used.
This commit is contained in:
parent
dd44b45cd0
commit
107a81412f
1 changed files with 0 additions and 15 deletions
15
src/main.ts
15
src/main.ts
|
|
@ -7,25 +7,10 @@ import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
|
||||||
import { context, trace } from "@opentelemetry/api";
|
import { context, trace } from "@opentelemetry/api";
|
||||||
import * as Sentry from "@sentry/node";
|
import * as Sentry from "@sentry/node";
|
||||||
import { RavenInterceptor } from "nest-raven";
|
import { RavenInterceptor } from "nest-raven";
|
||||||
import Pino from "pino";
|
|
||||||
import { AppModule } from "./app.module";
|
import { AppModule } from "./app.module";
|
||||||
import { Logger } from "nestjs-pino";
|
import { Logger } from "nestjs-pino";
|
||||||
import { Scope } from "@sentry/node";
|
import { Scope } from "@sentry/node";
|
||||||
|
|
||||||
const logger = Pino({
|
|
||||||
formatters: {
|
|
||||||
log(object) {
|
|
||||||
const span = trace.getSpan(context.active());
|
|
||||||
if (!span) return { ...object };
|
|
||||||
const { spanId, traceId } = span.spanContext();
|
|
||||||
return { ...object, spanId, traceId };
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
// @ts-expect-error
|
|
||||||
logger.log = logger.info;
|
|
||||||
|
|
||||||
function setupSentry(
|
function setupSentry(
|
||||||
app: NestExpressApplication,
|
app: NestExpressApplication,
|
||||||
configService: ConfigService
|
configService: ConfigService
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue