Skip to content

Commit

Permalink
Mount CLS directly
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Haselhan committed May 8, 2024
1 parent 0c30d21 commit d5ebc02
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion services/apps/alcs/src/main.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { UserModule } from './user/user.module';
}),
ClsModule.forRoot({
global: true,
middleware: { mount: true },
}),
WinstonModule,
DocumentModule,
Expand Down
3 changes: 2 additions & 1 deletion services/apps/alcs/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from '@nestjs/platform-fastify';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import * as config from 'config';
import { ClsMiddleware } from 'nestjs-cls';
import { S3StreamLogger } from 's3-streamlogger';
import { install } from 'source-map-support';
import * as winston from 'winston';
Expand Down Expand Up @@ -148,7 +149,6 @@ function setupLogger() {
http: 4,
debug: 5,
verbose: 6,
log: 7,
},
transports:
config.get('ENV') === 'production'
Expand All @@ -170,6 +170,7 @@ async function bootstrap() {
},
);
app.useLogger(logger);
app.use(new ClsMiddleware().use);

const extraArg = process.argv[2];
if (extraArg === 'graph') {
Expand Down

0 comments on commit d5ebc02

Please sign in to comment.