nestjs-pino 3.1.1-alpha.ebfdb2 → 3.1.1-alpha.ec49fd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LoggerModule.js +3 -3
- package/PinoLogger.d.ts +1 -1
- package/package.json +1 -1
- package/params.d.ts +1 -1
package/LoggerModule.js
CHANGED
|
@@ -23,9 +23,6 @@ const InjectPinoLogger_1 = require("./InjectPinoLogger");
|
|
|
23
23
|
const storage_1 = require("./storage");
|
|
24
24
|
const DEFAULT_ROUTES = [{ path: '*', method: common_1.RequestMethod.ALL }];
|
|
25
25
|
let LoggerModule = LoggerModule_1 = class LoggerModule {
|
|
26
|
-
constructor(params) {
|
|
27
|
-
this.params = params;
|
|
28
|
-
}
|
|
29
26
|
static forRoot(params) {
|
|
30
27
|
const paramsProvider = {
|
|
31
28
|
provide: params_1.PARAMS_PROVIDER_TOKEN,
|
|
@@ -59,6 +56,9 @@ let LoggerModule = LoggerModule_1 = class LoggerModule {
|
|
|
59
56
|
exports: [Logger_1.Logger, ...decorated, PinoLogger_1.PinoLogger, paramsProvider],
|
|
60
57
|
};
|
|
61
58
|
}
|
|
59
|
+
constructor(params) {
|
|
60
|
+
this.params = params;
|
|
61
|
+
}
|
|
62
62
|
configure(consumer) {
|
|
63
63
|
const { exclude, forRoutes = DEFAULT_ROUTES, pinoHttp, useExisting, } = this.params;
|
|
64
64
|
const middlewares = createLoggerMiddlewares(pinoHttp || {}, useExisting);
|
package/PinoLogger.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import pino from 'pino';
|
|
2
2
|
import { Params } from './params';
|
|
3
|
-
|
|
3
|
+
type PinoMethods = Pick<pino.Logger, 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'fatal'>;
|
|
4
4
|
export declare function __resetOutOfContextForTests(): void;
|
|
5
5
|
export declare class PinoLogger implements PinoMethods {
|
|
6
6
|
/**
|
package/package.json
CHANGED
package/params.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Options } from 'pino-http';
|
|
2
2
|
import { Logger, DestinationStream } from 'pino';
|
|
3
3
|
import { MiddlewareConfigProxy, ModuleMetadata } from '@nestjs/common/interfaces';
|
|
4
|
-
export
|
|
4
|
+
export type PassedLogger = {
|
|
5
5
|
logger: Logger;
|
|
6
6
|
};
|
|
7
7
|
export interface Params {
|