
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
mobx-spy-logger
Advanced tools
Easy to read, customisable mobx events logger based on mobx.spy.
This lib has peer dependencies:
mobx
lodash
(I'll try to remove it if it's a problem)The logger has "sane" defaults, for a quick start, you just need two lines of code:
import mobxSpyLogger from 'mobx-spy-logger'
mobxSpyLogger.start()
mobxSpyLogger.start() returns a mobx dispose function. You can stop logging this way if needed.
const stopLogging = mobxSpyLogger.start()
stopLogging()
Select what should be logged:
mobxSpyLogger.start({
spyActions: Boolean = true,
spyComputed: Boolean = true,
spyUpdates: Boolean = true,
})
Lets you customize the logs. Your logger function will be called with a parsed event.
mobx-spy-logger
parses the useful information from mobx spy events. Then, you can use it however you want.
mobxSpyLogger.start({
loggers: {
logAction (parsedAction) {
const {actor, actorId, actionName, eventArguments, isReaction} = parsedAction
console.log(...)
},
logUpdate (parsedUpdate) {
const {storeName, actorId, key, newValue} = parsedUpdate
console.log(...)
},
logComputed (parsedComputed) {
const {actor, actorId, key} = parsedComputed
console.log(...)
}
}
})
mobx-spy-logger
tries to find a unique id on the actor (eg: actor.id), defaults to mobx unique id.0.0.2 (2018-07-23)
<a name="0.0.1"></a>
FAQs
Easy to read, customisable mobx events logger based on mobx.spy.
The npm package mobx-spy-logger receives a total of 2 weekly downloads. As such, mobx-spy-logger popularity was classified as not popular.
We found that mobx-spy-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.