-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
samuel
committed
Jun 27, 2024
1 parent
70c0199
commit 8a4acca
Showing
10 changed files
with
22 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './http.module' | ||
export * from './logger.module' | ||
export * from './http/http.module' | ||
export * from './logger/logger.module' | ||
export * from './logger/service/logger.service' |
2 changes: 1 addition & 1 deletion
2
...js-shared/src/lib/module/logger.module.ts → ...ed/src/lib/module/logger/logger.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
export * from './logger.service' | ||
export * from './null-logger.service' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export * as coerce from './coerce.util' | ||
export * as secret from './secret.util' | ||
export * from './with-cors.util' | ||
export * from './with-custom-logger.util' | ||
export * from './with-swagger.util' |
14 changes: 14 additions & 0 deletions
14
packages/nestjs-shared/src/lib/util/with-custom-logger.util.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { INestApplication } from '@nestjs/common' | ||
import { LoggerService } from '../module/logger/service/logger.service' | ||
|
||
/** | ||
* Adds custom logger. | ||
* | ||
* @param app - The INestApplication instance. | ||
* @returns The modified INestApplication instance. | ||
*/ | ||
export const withCustomLogger = (app: INestApplication): INestApplication => { | ||
app.useLogger(app.get(LoggerService)) | ||
|
||
return app | ||
} |