Skip to content

Provides a `typhonjs-core-logging` enabled version of `typhonjs-core-backbone-events`.

License

Notifications You must be signed in to change notification settings

typhonjs-backbone/typhonjs-core-backbone-events-logged

Repository files navigation

typhonjs-core-backbone-events-logged

Backbone Documentation Code Style License Gitter

Build Status Coverage Dependency Status

Provides a typhonjs-core-logging enabled version of typhonjs-core-backbone-events. Please refer to typhonjs-core-backbone-events documentation for usage details.

TyphonLoggedEvents adds new functionality for triggering events. The following are new trigger mechanisms:

  • triggerDefer - Defers invoking trigger.
  • triggerFirst - Only invokes the first target matched and passes back any result to the callee.
  • triggerResults - Invokes all targets matched and passes back an array of results in an array to the callee.
  • triggerThen - Invokes all targets matched and adds any returned results through Promise.all which returns a single promise to the callee.

mainEventbus.js provides a standardized instance of TyphonLoggedEvents which serves as the name implies as a main eventbus.

Enabling eventbus logging aids debugging. A notable addition to the API is the following methods:

  • setEventScrubber - Sets a function which should accept one parameter which processes the logData object hash which is about to be sent to the logger. This is useful for scrubbing sensitive data such as username / password.
  • setLogLevel - Sets the log level used for logging output.

About

Provides a `typhonjs-core-logging` enabled version of `typhonjs-core-backbone-events`.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published