aboutsummaryrefslogtreecommitdiff
path: root/source/client/logger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'source/client/logger.ts')
-rw-r--r--source/client/logger.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/client/logger.ts b/source/client/logger.ts
index 7d61570..ea319b1 100644
--- a/source/client/logger.ts
+++ b/source/client/logger.ts
@@ -9,6 +9,10 @@ const log_tag_color: { [key in LogTag]: string } = {
// TODO maybe log time aswell
export function log(tag: LogTag, message: string, ...data: any[]) {
+ for (let i = 0; i < data.length; i++) {
+ const e = data[i];
+ if (e instanceof MediaStreamTrack) data[i] = `(${e.kind}) ${e.id}`
+ }
console.log(`%c[${tag}] ${message}`, "color:" + log_tag_color[tag], ...data);
}