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

RFC: Allow to configure effector-logger via babel-plugin settings #66

Closed
AlexandrHoroshih opened this issue Jan 5, 2022 · 3 comments
Closed
Labels

Comments

@AlexandrHoroshih
Copy link
Member

Problem

Currently, if effector-logger is added via babel-plugin, like this:

{
  "env": {
    "development": {
      "plugins": ["effector-logger/babel-plugin"]
    }
  }
}

There is no option to configure it in any way.

For e.g. i would prefer to keep easy one-line installation via plugin, but to disable logs to console in favor of inspector or redux-devtools

Propolsal

Allow configure effector-logger via plugin options, like it works now in attachLogger options

{
   "env":{
      "development":{
         "plugins":[
            [
               "effector-logger/babel-plugin",
               {
                  "reduxDevtools":"disabled",
                  "inspector":"disabled",
                  "console":"disabled"
               }
            ]
         ]
      }
   }
}
@AlexandrHoroshih
Copy link
Member Author

Also currently effector-logger/babel-plugun replaces imports like effector -> effector-logger

It may be useful to add option to change this behaviour

@VladPobidash
Copy link

VladPobidash commented Sep 9, 2022

I would like to log changes only with ReduxDevtools, maybe you find any solution for disabling the global console logging?

I've tried the solution with effector-root and attachLogger, but it doesn't help.
Also in my case, any domains at attachLogger don't work at all.

import { attachLogger } from 'effector-logger/attach'
import { root } from 'effector-root'

attachLogger(root, { console: 'disabled' })

@AlexandrHoroshih
Copy link
Member Author

Fixed by recent 0.14.0 release

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

No branches or pull requests

2 participants