title: Unable to inject winston's logger instance with NestJS
body: <p>I'm using NestJS <code>7.0.7</code> and Winston <code>3.2.1</code> (with nest-winston <code>1.3.3</code>).</p>
  
  <p>I'm trying to integrate Winston into NestJS, but so far, I'm unable to inject a logger instance (to actually log anything) into any controller/service.</p>
  
  <p>Since I would like to use Winston across the application <strong>AND</strong> during bootstrapping, I'm using the <a href="https://github.com/gremo/nest-winston#use-as-the-main-nest-logger" rel="noreferrer">approach</a> <em>as the main Nest logger</em>:</p>
  
  <pre class="lang-js prettyprint-override"><code>// main.ts
  import { NestFactory } from "@nestjs/core";
  import { WinstonModule } from "nest-winston";
  import { format, transports } from "winston";
  import { AppModule } from "./app.module";
  
  async function bootstrap(): Promise&lt;void&gt; {
    const app = await NestFactory.create(AppModule, {
      logger: WinstonModule.createLogger({
        exitOnError: false,
        format: format.combine(format.colorize(), format.timestamp(), format.printf(msg =&gt; {
          return `${msg.timestamp} [${msg.level}] - ${msg.message}`;
        })),
        transports: [new transports.Console({ level: "debug" })], // alert &gt; error &gt; warning &gt; notice &gt; info &gt; debug
      }),
    });
    app.use(helmet());
    await app.listen(process.env.PORT || 3_000);
  }
  
  bootstrap().then(() =&gt; {
    // ...
  });
  </code></pre>
  
  <p>I'm not doing anything in regard to the logging in <code>app.module.ts</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>// app.module.ts
  import { SomeController } from "@controller/some.controller";
  import { Module } from "@nestjs/common";
  import { SomeService } from "@service/some.service";
  
  @Module({
    controllers: [SomeController],
    imports: [],
    providers: [SomeService],
  })
  export class AppModule {
    // ...
  }
  </code></pre>
  
  <pre class="lang-js prettyprint-override"><code>// some.controller.ts
  import { Controller, Get, Inject, Param, ParseUUIDPipe, Post } from "@nestjs/common";
  import { SomeService } from "@service/some.service";
  import { WINSTON_MODULE_PROVIDER } from "nest-winston";
  import { Logger } from "winston";
  
  @Controller("/api/some-path")
  export class SomeController {
    constructor(@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger, private readonly service: SomeService) {
      // ...
    }
  
    ...
  }
  </code></pre>
  
  <p>The application tries to start but fails at some point:</p>
  
  <pre class="lang-sh prettyprint-override"><code>2020-04-06T18:51:08.779Z [info] - Starting Nest application...
  2020-04-06T18:51:08.787Z [error] - Nest can't resolve dependencies of the SomeController (?, SomeService). Please make sure that the argument winston at index [0] is available in the AppModule context.
  
  Potential solutions:
  - If winston is a provider, is it part of the current AppModule?
  - If winston is exported from a separate @Module, is that module imported within AppModule?
    @Module({
      imports: [ /* the Module containing winston */ ]
    })
  </code></pre>