Last active
March 26, 2019 23:06
-
-
Save TravisMullen/e2155c3ff199f139df9002b8253b1d75 to your computer and use it in GitHub Desktop.
Color logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { inspect } from 'util' | |
const defaultOptions = { colors: true, compact: false, depth: 5, breakLength: 80 } | |
function verboseLogger (obj, options = {}) { | |
console.log(inspect(obj, Object.assign({}, defaultOptions, options))) | |
} | |
export { verboseLogger as log } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment