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

WIP: Feature/override console with logger #2331

Merged

Conversation

daaru00
Copy link
Contributor

@daaru00 daaru00 commented Feb 1, 2019

Related issues

#2235

Short description and why it's useful

Replace console with a custom Logger class, in order to enhance control of logging. All console configurations can be made from the configuration file under console key.

{
  
  "console": {
    "showErrorOnProduction" : true,
    "verbosityLevel": "display-everything"
  },
  
}

the verbosityLevel key will be used for level switch, available values are:

  • display-everything display debug,info,warn and error
  • only-errors display only error messages
  • no-console disable all messages

Additionally when you set NODE_ENV environment variable to "production" every message will be automatically disabled. You can override this behavior only for error messages setting showErrorOnProduction to "true".

Screenshots of visual changes before/after (if there are any)

pre-changes
after-changes

Upgrade Notes and Changelog

  • No upgrade steps required (100% backward compatibility)
  • I've updated the Upgrade notes and Changelog on how to port existing VS sites with this new feature

Contribution and currently important rules acceptance

@filrak
Copy link
Collaborator

filrak commented Feb 1, 2019

Please see if the console context is kept

@filrak filrak changed the title Feature/override console with logger WIP: Feature/override console with logger Feb 1, 2019
Copy link
Collaborator

@pkarw pkarw left a comment

Choose a reason for hiding this comment

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

Looks fine for me. @filrak please give us the final green light to merge this one in

@pkarw pkarw requested review from filrak and patzick February 2, 2019 18:02
@pkarw pkarw added this to the 1.8 milestone Feb 2, 2019
@filrak
Copy link
Collaborator

filrak commented Feb 4, 2019

Looks good to me too. Finally we have everything covered. Thank you!

@filrak filrak merged commit c7f1217 into vuestorefront:develop Feb 4, 2019
@Igloczek Igloczek mentioned this pull request Feb 4, 2019
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.

None yet

3 participants