nestjs-pino | Platform agnostic logger for NestJS
kandi X-RAY | nestjs-pino Summary
kandi X-RAY | nestjs-pino Summary
Platform agnostic logger for NestJS based on Pino with REQUEST CONTEXT IN EVERY LOG
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nestjs-pino
nestjs-pino Key Features
nestjs-pino Examples and Code Snippets
Community Discussions
Trending Discussions on nestjs-pino
QUESTION
It's 3 days i am on this problem of E2E tests on my GraphQL application with NestJS + Apollo / Express.
When I am running my app with serverless offline or directly with my main file, it's working perfectly. I have my graph and all things I need :)
But, when I am running E2E tests with Jest, I received an error from the await app.init()
inside the beforeEach
.
After playing with the package.json and dependencies, the error throwed is TypeError: (0 , schema_1.makeExecutableSchema) is not a function
.
Someone have any idea please ? I am totally blocked ... :(
...ANSWER
Answered 2022-Feb-20 at 14:45After many hours of intense programming ... I finally found the problem.
Be careful if you use some "alias" for imports, because it can overwrite some of the packages used.
Here, i use the @graphql
alias, and it breaks all my tests.
When I remove it, the problem disappear.
QUESTION
I have a problem with @nestjs/graphql with serverless.
When i start the app normaly with the $ nest start
command, it's working well without any error.
But with the $ sls offline
command, it's not running and i have this error when i go to the /graphql (playground) endpoint :
ANSWER
Answered 2022-Feb-05 at 14:51According to this page https://docs.nestjs.com/graphql/unions-and-enums
enums need to be declared with the function registerEnumType
QUESTION
I updated my version of @nest/graphql from 7.9.11 to 7.11.0 and now I have the following error :
...ANSWER
Answered 2021-Dec-28 at 13:05As @ghiscoding said in its comment, playground option doesn't exist in newer versions, but playground still working without it.
QUESTION
I am trying to apply @elastic/ecs-pino-format to nestjs-pino. Under the good nestjs-pino is using http-pino
. I have noticed that http-pino
adds the request object inside [Symbol(pino.chindings)]
and I am assuming it's using a child logger.So I tried to write a custom formatter for extracting the req by calling obj.res.log.bindings()
and putting at http.request
to be compliant with Elastic Common Schema (ecs). The problem I face is now my log contains duplicate the req
and the http.request
and can't find a way to remove it. Not sure if I am looking in the wrong direction but I have found a lot of issues trying to make nestjs-pino print Elastic Common Schema (ecs) format logs. Also I have noticed issues where @elastic/ecs-pino-format can't handle fastify. Has anyone had similar issues ?
ANSWER
Answered 2021-Oct-26 at 15:57So I was confused with pino
and pino-http
and how they were integrated in nesjs-pino. From the looks of it @elastic/ecs-pino-format doesn't handle all the specifics for Elastic Common Schema (ecs) in pino-http
. So what I ended up doing was passing in nestjs-pino
as a configuration a merge of the format object from @elastic/ecs-pino-format and configuring pino-http
.
pino-http
supports passing
QUESTION
I get such error:
...ANSWER
Answered 2021-Feb-18 at 20:15From the error:
Error: Nest can't resolve dependencies of the CreateGroupTask (TaskQueueService, GroupsService, ?, GroupNotificationsService, GroupRepository, Logger). Please make sure that the argument dependency at index [2] is available in the TasksModule context.
Nest can't resolve the argument dependency
. Usually when this happens there is a circular file import that can't be resolved, meaning the dependency comes in as undefined
, so Nest provides a generic name for the dep. Check your file imports (including barrel files) and make sure you're not creating a circular import on accident.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nestjs-pino
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page