Skip to content

Conversation

@ltardivo
Copy link
Collaborator

Improves logs through winston.

Two daily-rotated files are created:

  • "logs/error-%date.log" (only error message are included) and
  • "logs/application-%date.log" (all logs up to BCN_LOG_LEVEL environment variable).

The level is managed via BCN_LOG_LEVEL environment variable (default 2):
0: Error logs only
1: Error and warning logs
2: Error, warning and info logs
3: Error, warning, info and http logs
4: Error, warning, info, http and debug logs

The Console transport can be disabled setting BCN_ENV to 'prod' in the .env file.

@ltardivo ltardivo requested a review from ClemensLey January 14, 2025 23:30
Copy link
Contributor

@ClemensLey ClemensLey left a comment

Choose a reason for hiding this comment

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

Looks good to me

@ClemensLey ClemensLey merged commit e725fc5 into main Jan 14, 2025
@ClemensLey ClemensLey deleted the feat/improve-logs branch January 14, 2025 23:47
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