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

create custom log method #73 #77

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

karanBRAVO
Copy link
Contributor

Describe the PR

This PR creates the custom log function, which takes 3 options other than message to log:

  1. level -> 'info', 'warn', 'error' -> change the console log color using chalk
  2. devOnly -> boolean -> checks the NODE_ENV before logging and NODE_ENV it is set to production && devOnly then logs are not shown
  3. logPath -> string -> which saves the log to provided path

How to test this PR?

  1. create backend/.env and add NODE_ENV environ variable
  2. run the server npm run backend
  3. see the logs

Eg:
warn

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign monokaix
You can assign the PR to them by writing /assign @monokaix in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karanBRAVO
Copy link
Contributor Author

/assign @Monokaix

@karanBRAVO
Copy link
Contributor Author

Hello @Monokaix, What are your reviews on this?

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

Successfully merging this pull request may close these issues.

3 participants