Giter Club home page Giter Club logo

nestjs-pino-issue's Introduction

Missing stack traces in Nestjs 8.1.4 + [email protected]

I created two NestJS projects Nestjs 7.6 + [email protected] and Nestjs 8.1.4 + [email protected] and modified app.controller.ts to throw an error.

Nestjs 7.6 + [email protected]

$ nest start
$ curl localhost:3007

Error log contains stack trace:

{"level":50,"time":1637054527569,"pid":88250,"hostname":"raidok","req":{"id":1,"method":"GET","url":"/","query":{},"params":{"0":""},"headers":{"host":"localhost:3007","user-agent":"curl/7.68.0","accept":"*/*"},"remoteAddress":"::ffff:127.0.0.1","remotePort":35738},"context":"ExceptionsHandler","trace":"Error: I want to log this error\n    at AppController.getHello (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/dist/app.controller.js:20:15)\n    at /tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/@nestjs/core/router/router-execution-context.js:38:29\n    at InterceptorsConsumer.intercept (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/@nestjs/core/interceptors/interceptors-consumer.js:11:20)\n    at /tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/@nestjs/core/router/router-execution-context.js:46:60\n    at /tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/@nestjs/core/router/router-proxy.js:9:23\n    at Layer.handle [as handle_request] (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/express/lib/router/layer.js:95:5)\n    at next (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/express/lib/router/route.js:137:13)\n    at Route.dispatch (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/express/lib/router/route.js:112:3)\n    at Layer.handle [as handle_request] (/tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/express/lib/router/layer.js:95:5)\n    at /tmp/tmp.xWHmFKglWp/nestjs-pino-issue/nest7/node_modules/express/lib/router/index.js:281:22","msg":"I want to log this error"}

Nestjs 8.1.4 + [email protected]

$ nest start
$ curl localhost:3008

Error log does not contain stack trace:

{"level":50,"time":1637054552021,"pid":88405,"hostname":"raidok","req":{"id":1,"method":"GET","url":"/","query":{},"params":{"0":""},"headers":{"host":"localhost:3008","user-agent":"curl/7.68.0","accept":"*/*"},"remoteAddress":"::ffff:127.0.0.1","remotePort":49020},"context":"ExceptionsHandler","msg":"I want to log this error"}

nestjs-pino-issue's People

Watchers

Raido Kaldma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.