Skip to content

Feature/config log levels - #12

Merged
jdacosta merged 2 commits into
developfrom
feature/config-log-levels
Feb 14, 2022
Merged

Feature/config log levels#12
jdacosta merged 2 commits into
developfrom
feature/config-log-levels

Conversation

@robiseb

@robiseb robiseb commented Feb 11, 2022

Copy link
Copy Markdown
Contributor

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 pushed 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