Skip to content

Commit

Permalink
style: adjust few stylings of logger plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kiaking committed Apr 23, 2020
1 parent 18be128 commit d2584b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions dist/logger.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/**
* Types for the logger plugin.
* This file must be put alongside the JavaScript file of the logger.
*/
// Types for the logger plugin. This file must be put alongside the bundled
// JavaScript file of the logger.

import { Payload, Plugin } from "../types/index";

Expand All @@ -12,8 +10,8 @@ export interface LoggerOption<S> {
mutationTransformer?: <P extends Payload>(mutation: P) => any;
actionFilter?: <P extends Payload>(action: P, state: S) => boolean;
actionTransformer?: <P extends Payload>(action: P) => any;
logActions?: boolean;
logMutations?: boolean;
logActions?: boolean;
}

export default function createLogger<S>(option?: LoggerOption<S>): Plugin<S>;
2 changes: 1 addition & 1 deletion src/plugins/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export default function createLogger ({
mutationTransformer = mut => mut,
actionFilter = (action, state) => true,
actionTransformer = act => act,
logActions = true,
logMutations = true,
logActions = true,
logger = console
} = {}) {
return store => {
Expand Down

0 comments on commit d2584b1

Please sign in to comment.