Skip to content

Feature/config log levels #12

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

Merged
merged 2 commits into from
Feb 14, 2022
Merged

Feature/config log levels #12

merged 2 commits into from
Feb 14, 2022

Conversation

robiseb
Copy link
Contributor

@robiseb robiseb commented Feb 11, 2022

Fix issue #8

  • Add a log config option to Modulus

Log level

To keep only warn and error logs (for production usage), set production to true:

import modulus from '@wide/modulus'

modulus.config({ production: true })

Or manually assign a log level:

import modulus, { LOG_LEVELS } from '@wide/modulus'

modulus.config({
  log: {
    level: LOG_LEVELS.INFO // DEBUG (default), INFO, WARN, ERROR, NONE
  }
})

⚠️ Note: assign a log level will override the production setting.

To disable logs, set enabled to false:

import modulus from '@wide/modulus'

modulus.config({
  log: {
    enabled: false
  }
})

The default config is setted to show all kind of logs.

@robiseb robiseb linked an issue Feb 11, 2022 that may be closed by this pull request
@jdacosta jdacosta merged commit 6584bc6 into develop Feb 14, 2022
robiseb added a commit that referenced this pull request Feb 15, 2022
@robiseb robiseb mentioned this pull request Feb 15, 2022
robiseb added a commit that referenced this pull request Feb 15, 2022
* Fix issue #9 - Custom parameters added on data-call.params HTML attribute

* Fix issue #9 - Readme updated

* Fix issue #9 - Readme updated

* Add configurable log levels system

* Add enabled attribute

* Fixes for issues #12 and #13

Co-authored-by: Aymeric <aymeric.assier@accenture.com>
Co-authored-by: Julien Martins Da Costa <jdacosta@users.noreply.github.com>
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.

Debugging instruction in production
2 participants