{"size": 755, "ext": "js", "max_stars_repo_path": "src/util/logger.js", "max_stars_repo_name": "sdawood/es2105summary", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/util/logger.js", "max_issues_repo_name": "sdawood/es2105summary", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/util/logger.js", "max_forks_repo_name": "sdawood/es2105summary", "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": 29.0384615385, "max_line_length": 120, "alphanum_fraction": 0.719205298}
import util from 'util'
import _ from 'lodash' // module.exports = obj in CommonJS === exports default obj

export const LOGGER_NAME_SYMBOL = Symbol.for('MAIN_LOGGER')

export const log = (...args) => console.log(...args.map(stringify))

export const error = (...args) => console.error(...args.map(stringify))

const stringify = value => _.isString(value)? value : util.inspect(value, false, null)

const logger = {log, error}

export default logger

// variations

// export {log as LOG}
// export {logger as default}

// vvvv Syntax error vvvv
// export default const logger = {log, error}
// default can't be followed by a declaration to avoid the temptation of multiple declaration on the export default line

// re-export
export {inspect} from 'util'