Skip to content

Conversation

@arusakov
Copy link

Hi, thank a lot for great logger!

Option for action type transforming will be helpful, if action type is a number (for example, member of some enum). In this case for pretty logging you can provide typeToString function like this:

const enum = {
  1: 'action_one',
  2: 'action_two',
  action_one: 1,
  action_two: 2
};

import createLogger from 'redux-logger';
const logger = createLogger({
  typeToString: (type) => enum[type]
});

// ...
// and somewhere in app
dispatch({type: enum.action_one});

@imevro
Copy link
Collaborator

imevro commented Sep 24, 2015

Hi, thanks for idea. Will release in 1.1.0 tomorrow!

@imevro imevro closed this Sep 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants