We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 97eae26 commit ac156efCopy full SHA for ac156ef
src/main.ts
@@ -5,9 +5,15 @@ import { NestFactory } from "@nestjs/core";
5
import { RandomExampleProviderModule } from "./app.module";
6
import { DocumentBuilder, SwaggerDocumentOptions, SwaggerModule } from "@nestjs/swagger";
7
import helmet from "helmet";
8
+import { LogLevel } from "@nestjs/common";
9
10
async function bootstrap() {
- const app = await NestFactory.create(RandomExampleProviderModule);
11
+ let logLevels: LogLevel[] = ["log"];
12
+ if (process.env.LOG_LEVEL == "debug") {
13
+ logLevels = ["verbose"];
14
+ }
15
+
16
+ const app = await NestFactory.create(RandomExampleProviderModule, { logger: logLevels });
17
app.use(helmet());
18
const basePath = process.env.VALUE_PROVIDER_CLIENT_BASE_PATH ?? "";
19
0 commit comments