Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ __createLogger(options?: Object)__
#### __level (String)__
Level of `console`. `warn`, `error`, `info` or [else](https://developer.mozilla.org/en/docs/Web/API/console).

#### __logger (Object)__
Implementation of the `console` API. Useful if you are using a custom, wrapped version of `console`.

#### __collapsed (Boolean)__
Is group collapsed?

Expand Down
3 changes: 2 additions & 1 deletion src/createLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

function createLogger(options = {}) {
return ({ getState }) => (next) => (action) => {
const { level, collapsed, predicate } = options;
const { level, collapsed, predicate, logger } = options;
const console = logger || console;

// exit if console undefined
if (typeof console === 'undefined') {
Expand Down