Last active
July 4, 2022 16:07
-
-
Save ilyasakin/79fbac69d25dafc5e1ee414644d9ad48 to your computer and use it in GitHub Desktop.
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 default class LoggingService { | |
public log(message: string, payload: unknown = null): void { | |
console.log(`%cLOG: %c${message}`, 'color: yellow;', 'color: white'); | |
if (payload) { | |
console.log('LOG_PAYLOAD: ', payload); | |
} | |
} | |
public error(message: string, payload: unknown = null): void { | |
console.error(`%cERR: %c${message}`, 'color: red; font-weight: bold', 'color: red'); | |
if (payload) { | |
console.log('ERROR_PAYLOAD: ', payload); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment