effector / logger

Simple logger with stores inspector
https://npmjs.com/effector-logger
160 stars 22 forks source link

Debug domain with settings is not working #109

Closed VladPobidash closed 1 year ago

VladPobidash commented 2 years ago

I need to disable logging to the console for all effector modules. Since it has no opportunities to disable it globally I've followed Debug domain with settings to do it manually for every module.

For example, I've got the next code, but it's not working. I still get logging for the detail module.

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

const domain = createDomain('detail')

export const fetchDetailFx = domain.createEffect()

export const setDetail = domain.createEvent()
export const clearDetail = domain.createEvent()

export const $detail = domain.createStore({})

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

What do I do wrong?

AlexandrHoroshih commented 1 year ago

Hello!

As of the recent '0.14.0' release, 'effector-logger' no longer includes 'effector-inspector' and integration with redux-devtools, so all related issues are gone.

Also, logger does not rely on domains anymore

See the release notes for details https://github.com/effector/logger/releases/tag/v0.14.0