From 99b0117de9299da491c925fe9a097832e357330a Mon Sep 17 00:00:00 2001 From: Frederik <53608074+N0chteil@users.noreply.github.com> Date: Sun, 22 Oct 2023 15:00:15 +0200 Subject: [PATCH] feat: add separate log for player debug --- src/managers/bridge.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/managers/bridge.ts b/src/managers/bridge.ts index fe97351..b4de3a0 100644 --- a/src/managers/bridge.ts +++ b/src/managers/bridge.ts @@ -28,6 +28,7 @@ export class Bridge { elapsedTime: 0, remainingTime: 0 }; + private playerLog: log.ElectronLog = log.create("player"); public bridge: AppleBridge = new AppleBridge(); public lastTrack: any = {}; @@ -47,6 +48,8 @@ export class Bridge { log.info("[Bridge]", "Initializing Bridge"); + this.playerLog.transports.file.fileName = `bridge-player.log`; + if (config.get("service") === "music") { log.info("[Bridge]", "Using WatchDog"); @@ -188,12 +191,12 @@ export class Bridge { return log.warn("[Bridge]", "No Track detected"); // TODO: remove in stable release, keep for beta - log.debug( + this.playerLog.debug( "[BetaDebugLog][Bridge][onPlay]", "typeof this.discord", typeof this.discord ); - log.debug( + this.playerLog.debug( "[BetaDebugLog][Bridge][onPlay]", "currentTrack", currentTrack