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

log: add winston #485

Merged
merged 1 commit into from
Oct 16, 2024
Merged

log: add winston #485

merged 1 commit into from
Oct 16, 2024

Conversation

fufeck
Copy link
Collaborator

@fufeck fufeck commented Oct 7, 2024

CONTEXT

Les logs sur datadog sont ilisible car scalingo rajouter un header a chaque ligne.

FIX

Installé winston pour sortir les erreur en une seule lignes

@fufeck fufeck requested a review from MaGOs92 October 7, 2024 08:22
@fufeck fufeck force-pushed the fufeck_log_add-nestjs-winston branch 3 times, most recently from eb613d7 to e3db214 Compare October 8, 2024 08:44
Copy link
Collaborator

@MaGOs92 MaGOs92 left a comment

Choose a reason for hiding this comment

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

Capture d’écran 2024-10-08 à 11 31 15

Je trouve ça un peu tristoune sans les couleurs, y'a pas moyen de les ajouter avec winston?
Je vois pas ou est-ce que tu spécifies qu'en prod le transport doit être JSON et en dev l'output notmal. T'as testé de le mettre sur staging voir ce que ça donne dans Scalingo et datadog?

apps/api/src/main.ts Outdated Show resolved Hide resolved
apps/api/src/lib/utils/csv.utils.ts Outdated Show resolved Hide resolved
@fufeck fufeck force-pushed the fufeck_log_add-nestjs-winston branch 2 times, most recently from d82f486 to 4e4508b Compare October 8, 2024 14:50
@fufeck
Copy link
Collaborator Author

fufeck commented Oct 8, 2024

Capture d’écran 2024-10-08 à 11 31 15 Je trouve ça un peu tristoune sans les couleurs, y'a pas moyen de les ajouter avec winston? Je vois pas ou est-ce que tu spécifies qu'en prod le transport doit être JSON et en dev l'output notmal. T'as testé de le mettre sur staging voir ce que ça donne dans Scalingo et datadog?

J'ai remis la couleur en dev
J'ai donc fait un mode différent pour la PROD
Il est en ligne sur la staging

@fufeck fufeck requested a review from MaGOs92 October 8, 2024 14:54
package.json Outdated Show resolved Hide resolved
);

if (process.env.NODE_ENV === 'production') {
format = winston.format.simple();
Copy link
Collaborator

Choose a reason for hiding this comment

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

ah je pensais qu'en prod il fallait que ça soit json le format

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Négatif, cela affiche sensiblement la même chose mais en json... Aucun intéret

@fufeck fufeck force-pushed the fufeck_log_add-nestjs-winston branch from 0ae1fde to 085a4a9 Compare October 14, 2024 08:21
@fufeck fufeck force-pushed the fufeck_log_add-nestjs-winston branch from 085a4a9 to 9a1b2b4 Compare October 14, 2024 15:31
@fufeck fufeck requested a review from MaGOs92 October 15, 2024 09:20
Copy link
Collaborator

@MaGOs92 MaGOs92 left a comment

Choose a reason for hiding this comment

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

LGTM

@fufeck fufeck merged commit 17816d8 into master Oct 16, 2024
4 checks passed
@fufeck fufeck deleted the fufeck_log_add-nestjs-winston branch October 16, 2024 12:43
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.

2 participants