nestjs-pino
Advanced tools
Comparing version 0.3.2 to 0.4.0
import { NestFactory } from "@nestjs/core"; | ||
import { Module, Controller, Get, Injectable } from "@nestjs/common"; | ||
import MemoryStream from "memorystream"; | ||
import request from "supertest"; | ||
import pino from "pino"; | ||
import MemoryStream = require("memorystream"); | ||
import * as request from "supertest"; | ||
import * as pino from "pino"; | ||
import { Logger, LoggerModule } from "../src"; | ||
@@ -7,0 +7,0 @@ import { platforms } from "./utils/platforms"; |
import { NestFactory } from "@nestjs/core"; | ||
import { Module, Controller, Get, Injectable } from "@nestjs/common"; | ||
import MemoryStream from "memorystream"; | ||
import request from "supertest"; | ||
import MemoryStream = require("memorystream"); | ||
import * as request from "supertest"; | ||
import { Logger, LoggerModule } from "../src"; | ||
@@ -6,0 +6,0 @@ import { platforms } from "./utils/platforms"; |
import { NestFactory } from "@nestjs/core"; | ||
import { Module, Controller, Get, Injectable } from "@nestjs/common"; | ||
import MemoryStream from "memorystream"; | ||
import request from "supertest"; | ||
import pino from "pino"; | ||
import MemoryStream = require("memorystream"); | ||
import * as request from "supertest"; | ||
import * as pino from "pino"; | ||
import { Logger, LoggerModule } from "../src"; | ||
@@ -7,0 +7,0 @@ import { platforms } from "./utils/platforms"; |
import { LoggerService, DynamicModule } from "@nestjs/common"; | ||
import { ModuleMetadata } from "@nestjs/common/interfaces"; | ||
import pinoHttp from "pino-http"; | ||
import pino, { LoggerOptions, DestinationStream } from "pino"; | ||
import * as pinoHttp from "pino-http"; | ||
import * as pino from "pino"; | ||
import { DestinationStream, LoggerOptions } from "pino"; | ||
declare type PassedLogger = { | ||
@@ -6,0 +7,0 @@ logger: pino.Logger; |
@@ -14,10 +14,7 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var LoggerModule_1, LoggerCoreModule_1; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_1 = require("@nestjs/common"); | ||
const pino_http_1 = __importDefault(require("pino-http")); | ||
const pino_1 = __importDefault(require("pino")); | ||
const pinoHttp = require("pino-http"); | ||
const pino = require("pino"); | ||
const express_ctx_1 = require("express-ctx"); | ||
@@ -29,3 +26,3 @@ const LOGGER_KEY = "logger"; | ||
if (Array.isArray(options)) { | ||
this.outOfContext = pino_1.default(...options); | ||
this.outOfContext = pino(...options); | ||
} | ||
@@ -36,3 +33,3 @@ else if (isPassedLogger(options)) { | ||
else { | ||
this.outOfContext = pino_1.default(options || undefined); | ||
this.outOfContext = pino(options || undefined); | ||
} | ||
@@ -160,4 +157,4 @@ } | ||
const middleware = Array.isArray(params) | ||
? pino_http_1.default(...params) | ||
: pino_http_1.default(params || undefined); | ||
? pinoHttp(...params) | ||
: pinoHttp(params || undefined); | ||
return [express_ctx_1.middleware, middleware, bindLoggerMiddleware]; | ||
@@ -164,0 +161,0 @@ } |
{ | ||
"name": "nestjs-pino", | ||
"version": "0.3.2", | ||
"version": "0.4.0", | ||
"description": "Pino logger for NestJS", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,3 +13,3 @@ { | ||
"incremental": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true | ||
@@ -16,0 +16,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
355576
766