fix(maloja): Fix logging objects

This commit is contained in:
FoxxMD
2026-01-27 17:06:20 +00:00
parent 1ce27a2543
commit fa06d65046
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -261,14 +261,14 @@ export class MalojaApiClient extends AbstractApiClient {
return [scrobbleResponse, responseBody, warnStr]
} catch (e) {
this.logger.error(`Scrobble Error (${sType})`, { playInfo: buildTrackString(playObj), payload: scrobbleData });
this.logger.error({ playInfo: buildTrackString(playObj), payload: scrobbleData }, `Scrobble Error (${sType})`);
const responseError = getMalojaResponseError(e);
if (responseError !== undefined) {
if (responseError.status < 500 && e instanceof UpstreamError) {
e.showStopper = false;
}
if (responseError.response?.text !== undefined) {
this.logger.error('Raw Response:', { text: responseError.response?.text });
this.logger.error({ text: responseError.response?.text }, 'Raw Response');
}
}
throw e;
+1 -1
View File
@@ -122,7 +122,7 @@ export default class MalojaScrobbler extends AbstractScrobbleClient {
await this.notifier.notify({ title: `Client - ${capitalize(this.type)} - ${this.name} - Scrobble Error`, message: `Failed to scrobble => ${buildTrackString(playObj)} | Error: ${e.message}`, priority: 'error' });
throw e;
} finally {
this.logger.debug('Raw Payload:', scrobbleData);
this.logger.debug(scrobbleData, 'Raw Payload');
}
}
}