Skip to content

Releases: LogRocket/redux-logger

2.3.1

17 Dec 10:48
Compare
Choose a tag to compare

Changelog

Updates for error feature.

Thanks @hon2a, #107.

2.3.0

16 Dec 23:42
Compare
Choose a tag to compare

Changelog

  • feature: action will be logged as error when it fails during execution (thanks @hon2a, #103)

2.2.1

10 Dec 08:36
Compare
Choose a tag to compare

Changelog

  • feature: colors.title with action argument for better color management

Thankfully to @af and #100 now you can paint even title! 💅
For example, you can paint title for red if action has fail in type.

const logger = createLogger({
  colors: {
    title: (action) => {
      if (action.type.indexOf(`fail`)) {
        return `red`;
      } else {
        return `#111`;
      }
    };
  }
})

2.1.4

08 Dec 17:10
Compare
Choose a tag to compare

Changelog

  • fix: if duration or timestamp was false, it logged as false (#99, #101)

2.1.3

07 Dec 13:50
Compare
Choose a tag to compare

Changelog

  • fix: babel 6 exported { default: [ Function ] } instead of [ Function ] by default (#98)

2.1.2

07 Dec 13:44
Compare
Choose a tag to compare

Changelog

  • fix: action must be executed after prevState and before nextState (#97)

2.1.1

06 Dec 15:48
Compare
Choose a tag to compare

Changelog

  • deprecated: transformer is deprecated, use stateTransformer instead
  • feature: colors object

Colors

We have so much requests (#91, #94 and other) about control over messages, so we bring it to life 🎉
Logger now have colors: Object option with 3 keys: prevState, action, nextState, each must return color as string (for example, red or #03A9F4).

  • prevState(prevState: Object) => color: String
  • action(action: Object) => color: String
  • nextState(nextState: Object) => color: String

colors also can be false if you don't need paint message or your env doesn't support console formatting (#92).

Examples

Disable colors

const logger = createLogger({
  colors: false
});

Paint action message with type AUTH_TOKEN_REMOVE to red

const logger = createLogger({
  colors: {
    prevState: () => `#9E9E9E`,
    action: (action) => action.type === `AUTH_REMOVE_TOKEN` && `red`,
    nextState: () => `#4CAF50`,
  }
});

2.0.4

15 Oct 08:55
Compare
Choose a tag to compare

Changelog

  • fix: internal polyfill for repeat method used in pad function (#46, #47)

2.0.3

06 Oct 13:19
Compare
Choose a tag to compare

Changelog

  • fix: log didn't work when collapsed was true (thanks @steida, #45)

2.0.2

05 Oct 16:41
Compare
Choose a tag to compare

Changelog

  • feature: added ms to timestamp (thanks @toxickg, #42)