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

Fix: Replace Console Transport with File Transports to Prevent Memory Issues #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JumpingCodes
Copy link

This PR addresses a memory issue caused by the usage of the Console transport in production environments. According to the official documentation, using the Console transport in production is not recommended due to potential high memory usage.

Changes Made

  • Removed the Console transport.
  • Added two File transports to handle logging:
    • error.log: Logs messages with an importance level of error or less.
    • combined.log: Logs messages with an importance level of info or less.

Testing
Verified that logs are correctly written to error.log and combined.log.
Confirmed that memory usage remains stable in a production-like environment.
Additional Notes
Please review the changes and let me know if there are any concerns or suggestions for further improvement.

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.

1 participant