Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 feat: added pinojs and logger aggregation using asynclocalstorage implementation. [v.0] #65

Open
wants to merge 17 commits into
base: develop
Choose a base branch
from

Conversation

paulofdev
Copy link
Contributor

@paulofdev paulofdev commented Nov 29, 2024

Midaz Console Pull Request Checklist

Pull Request Type

  • UI
  • Core (Business Lógic)
  • Security
  • internationalization
  • Pipeline
  • Documentation
  • Observability

Checklist

Please check each item after it's completed.

  • I have tested these changes locally.
  • I have updated the documentation accordingly.
  • I have added necessary comments to the code, especially in complex areas.
  • I have ensured that my changes adhere to the project's coding standards.
  • I have checked for any potential security issues.
  • I have ensured that all tests pass.
  • I have updated the version appropriately (if applicable).
  • I have confirmed this code is ready for review.

Additional Notes

Obs: Please, always remember to target your PR to develop branch instead of main.

@paulofdev paulofdev marked this pull request as ready for review November 29, 2024 21:31
@paulofdev paulofdev changed the title Feature/logger 🚀 feat: added pinojs and logger aggregation using asynclocalstorage implementation. [v.0] Dec 10, 2024
@paulofdev paulofdev self-assigned this Dec 10, 2024
src/lib/logger/pino-logger.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
const { message, status } = await apiErrorHandler(error)
return NextResponse.json(portfolio)
} catch (error: any) {
console.error('Error getting portfolio', error)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remover console.log()

body: JSON.stringify(portfolio)
body: JSON.stringify(portfolio),
headers: {
'X-Midaz-Id': midazId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O nome do header não é Midaz-Id? Segundo a documentação, seria esse o nome do atributo do header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -11,6 +11,7 @@ export class MidazCreatePortfolioRepository
async create(
organizationId: string,
ledgerId: string,
midazId: string,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Não esta enviando o midazId para o midaz, precisa incluir no header.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

...event
}

// switch (event.level) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remover comentários.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

Copy link
Contributor

@augusto-draxx augusto-draxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verificar comentários.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants