Skip to content

Instantly share code, notes, and snippets.

@timcole
Last active February 16, 2020 00:22
Show Gist options
  • Save timcole/edae3c4b01e0b3e3c165ba1b7380fe66 to your computer and use it in GitHub Desktop.
Save timcole/edae3c4b01e0b3e3c165ba1b7380fe66 to your computer and use it in GitHub Desktop.
Custom Log Example
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
);
}
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