Last active
February 16, 2020 00:22
-
-
Save timcole/edae3c4b01e0b3e3c165ba1b7380fe66 to your computer and use it in GitHub Desktop.
Custom Log Example
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 function Log(caller = "Router", ...logs) { | |
console.log( | |
`%c Notify.me %c ${caller} `, | |
"background: #a36ad8; color: #e8e8e8; border-radius: 3px 0 0 3px;", | |
"background: #6e4693; color: #e8e8e8; border-radius: 0 3px 3px 0;", | |
...logs | |
); | |
} |
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 function Log(caller: string = "Router", ...logs: any): void { | |
const name: string = "Notify.me"; | |
console.log( | |
`%c ${name} %c ${caller} `, | |
"background: #a36ad8; color: #e8e8e8; border-radius: 3px 0 0 3px;", | |
"background: #6e4693; color: #e8e8e8; border-radius: 0 3px 3px 0;", | |
...logs | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment