You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to initialize the SqsModule with my config provider and my custom logger instance.
In order to do this, I can use imports with the NestJS ConfigModule... but to inject the Logger as a provider does not work because in the SqsModuleAsyncOptions definition only imports was "picked" from ModuleMetadata: https://github.com/ssut/nestjs-sqs/blob/master/lib/sqs.types.ts#L34
As a workaround, I created a simple module to export the logger, then added that module to my SqsModule registration and it works as expected:
Is there any reason proivders was omitted from the registration of the SqlModule? If we could access providers in SqsModuleAsyncOptions then there wouldn't be any need for boilerplate module code to inject providers such as Logger.
The text was updated successfully, but these errors were encountered:
I want to initialize the
SqsModule
with my config provider and my custom logger instance.In order to do this, I can use
imports
with the NestJSConfigModule
... but to inject theLogger
as aprovider
does not work because in theSqsModuleAsyncOptions
definition onlyimports
was "picked" fromModuleMetadata
: https://github.com/ssut/nestjs-sqs/blob/master/lib/sqs.types.ts#L34As a workaround, I created a simple module to export the logger, then added that module to my
SqsModule
registration and it works as expected:usage:
Is there any reason
proivders
was omitted from the registration of theSqlModule
? If we could accessproviders
inSqsModuleAsyncOptions
then there wouldn't be any need for boilerplate module code to inject providers such asLogger
.The text was updated successfully, but these errors were encountered: