Skip to content

Releases: LogRocket/redux-logger

2.7.4 — revert 2.7.1 because redux-logger was broken in node.js

29 Oct 13:22
Compare
Choose a tag to compare

Changelog

  • fix: revert changes from #185 because redux-logger was broken in node.js

Sorry for this, I was not careful and didn't tested that PR

2.7.2 — fix default title transformer

28 Oct 20:21
Compare
Choose a tag to compare

Changelog

  • default title transformer has redundant symbols when timestamp is disabled (#186)

2.7.1 — fix undefined console in IE9

28 Oct 19:57
Compare
Choose a tag to compare

Changelog

  • fix undefined console in IE9 (#185)

2.7.0 — diff (alpha), formatter for title

05 Oct 19:41
Compare
Choose a tag to compare

Diff

@sibelius merged redux-diff-logger and now you can use it by passing diff: true to options in createLogger(), f.e.

const logger = createLogger({
  diff: true,
});

❗️ Diff is very unstable and not tested, so we don't recommend use it as primary feature of logging.

Formatter for title

@spalger made titleFormatter option (#165)

titleFormatter = (action: Object, time: String?, took: Number?) => title

Format the title used for each action.

Default: prints something like action @ ${time} ${action.type} (in ${took.toFixed(2)} ms)

Bugfixes

  • fix: performance now checking for null and don't fail with TypeError (#173)
  • fix: default color of title now inherits console's default color (#176)

2.6.1

29 Feb 21:38
Compare
Choose a tag to compare

Changelog

fix: broken level option when specified object or function (#135)

2.6.0

22 Feb 13:05
Compare
Choose a tag to compare

Fine-grained control over level 🚀

Thankfully to @mathieudutour now we have very useful feature: fine-grained control over level.

function

const logger = createLogger({
  level: (action) => action.type === `SET_AUTH_TOKEN` ? `warning` : `log`
});

object

const logger = createLogger({
  level: {
    prevState: `log`,
    action: `info`,
    nextState: `log`,
    error: `error`,
  },
});

object with functions

const logger = createLogger({
  level: {
    prevState: false, // disable message of prevState
    action: ({ type }) => type.indexOf(`redux-form`) > -1 ? false : `info`, // don't show messages from redux-form (sorry, erikras, it's for demo only!)
    nextState: ({ type }) => type.indexOf(`user`) > -1 ? `warning` : `info`, // show nextState as warning if action is user-related
    error: `error`,
  },
});

2.5.2

11 Feb 10:17
Compare
Choose a tag to compare

New action title! 💃

Now it's more accurate and structured and looks like table.

Before

After

2.5.1

11 Feb 09:11
Compare
Choose a tag to compare

Changelog

  • fix: a bug where Date() was being passed a timer value from performance.now() instead of a proper date/time (#125, #131)

2.5.0

03 Feb 20:49
Compare
Choose a tag to compare

redux-logger now supports server-side rendering without pain 🎉

Chanelog

  • fixed: replaced window.console for console as default value for logger option (#121)

2.4.0

22 Jan 06:22
Compare
Choose a tag to compare

Changelog

  • fix: log order was messed when store dispatched new action in response of previous (thanks, @jetzhliu, #102)
  • fix: next state wasn't logged when spawned error (thanks, @cappslock, #115)