{"size": 343, "ext": "js", "max_stars_repo_path": "middlewares/logMiddleware.js", "max_stars_repo_name": "r4ro-han/react-redux-starter", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "middlewares/logMiddleware.js", "max_issues_repo_name": "r4ro-han/react-redux-starter", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "middlewares/logMiddleware.js", "max_forks_repo_name": "r4ro-han/react-redux-starter", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.5, "max_line_length": 112, "alphanum_fraction": 0.6297376093}
const logMiddleware = ({getState, dispatch}) => (next) => (action) => {
    log(action.type);
    next(action);
}

const log = () => {
    if (process.env.DISABLE_LOGGING) {
        return;
    }
    console.log.apply(console.log, [new Date().toISOString()].concat(Array.prototype.slice.call(arguments, 0)));
};

export default logMiddleware;
