Created
July 15, 2019 02:11
-
-
Save leohxj/2ddea05f87285334684271a7175d92b9 to your computer and use it in GitHub Desktop.
custom logger
This file contains 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
export const logger = (name, ...args) => { | |
if (process.env.NODE_ENV === 'development') { | |
// eslint-disable-next-line | |
console.groupCollapsed(`logger --> ${name}`); | |
// eslint-disable-next-line | |
console.log(...args); | |
// eslint-disable-next-line | |
console.groupEnd(); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment