diff options
author | MetaMuffin <metamuffin@yandex.com> | 2021-08-05 11:00:46 +0200 |
---|---|---|
committer | MetaMuffin <metamuffin@yandex.com> | 2021-08-05 11:00:46 +0200 |
commit | 4475fb02925c04ba19cb9ec8b99110e4e74c3acb (patch) | |
tree | 85df7f1e46ccf7abdc80303b88d57779c0f40008 /source/client/logger.ts | |
parent | a8d6fa97be777ab08f09252dc4864ba241b17687 (diff) | |
download | keks-meet-4475fb02925c04ba19cb9ec8b99110e4e74c3acb.tar keks-meet-4475fb02925c04ba19cb9ec8b99110e4e74c3acb.tar.bz2 keks-meet-4475fb02925c04ba19cb9ec8b99110e4e74c3acb.tar.zst |
updated licence, added all the code
Diffstat (limited to 'source/client/logger.ts')
-rw-r--r-- | source/client/logger.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/client/logger.ts b/source/client/logger.ts new file mode 100644 index 0000000..7d61570 --- /dev/null +++ b/source/client/logger.ts @@ -0,0 +1,15 @@ + +export type LogTag = "webrtc" | "ws" | "media" | "*" +const log_tag_color: { [key in LogTag]: string } = { + "*": "#FF0000", + webrtc: "#990099", + media: "#999900", + ws: "#009999" +} + +// TODO maybe log time aswell +export function log(tag: LogTag, message: string, ...data: any[]) { + console.log(`%c[${tag}] ${message}`, "color:" + log_tag_color[tag], ...data); +} + + |