remove logMsg and refactor messages inline

This commit is contained in:
jeffvli
2026-02-13 02:34:22 -08:00
parent 02a5395453
commit bca14176fb
14 changed files with 150 additions and 311 deletions
@@ -16,7 +16,6 @@ import {
useSettingsStore,
} from '/@/renderer/store';
import { LogCategory, logFn } from '/@/renderer/utils/logger';
import { logMsg } from '/@/renderer/utils/logger-message';
import { shuffleInPlace } from '/@/renderer/utils/shuffle';
import { hasFeature } from '/@/shared/api/utils';
import { Played, Song, SongListSort, SortOrder } from '/@/shared/types/domain-types';
@@ -63,7 +62,7 @@ export const useAutoDJ = () => {
return;
}
logFn.debug(logMsg[LogCategory.PLAYER].autoPlayTriggered, {
logFn.debug('Auto play triggered', {
category: LogCategory.PLAYER,
meta: { remaining: properties.remaining, songId: properties.song?.id },
});
@@ -207,7 +206,7 @@ export const useAutoDJ = () => {
songCount: songsToAdd.length,
});
} catch (error) {
logFn.error(logMsg[LogCategory.PLAYER].autoPlayFailed, {
logFn.error('Auto play failed', {
category: LogCategory.PLAYER,
meta: { error: (error as Error).message, songId: properties.song?.id },
});
@@ -12,7 +12,6 @@ import {
useTimestampStoreBase,
} from '/@/renderer/store';
import { LogCategory, logFn } from '/@/renderer/utils/logger';
import { logMsg } from '/@/renderer/utils/logger-message';
import { LibraryItem, QueueSong, ServerType } from '/@/shared/types/domain-types';
import { PlayerStatus } from '/@/shared/types/types';
@@ -131,7 +130,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledTimeupdate, {
logFn.debug('Scrobbled a timeupdate event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -173,7 +172,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledSubmission, {
logFn.debug('Scrobbled a submission event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -257,7 +256,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledStart, {
logFn.debug('Scrobbled a start event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -319,7 +318,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledTimeupdate, {
logFn.debug('Scrobbled a timeupdate event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -367,7 +366,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledPause, {
logFn.debug('Scrobbled a pause event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -393,7 +392,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledUnpause, {
logFn.debug('Scrobbled an unpause event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,
@@ -436,7 +435,7 @@ export const useScrobble = () => {
},
{
onSuccess: () => {
logFn.debug(logMsg[LogCategory.SCROBBLE].scrobbledStart, {
logFn.debug('Scrobbled a start event', {
category: LogCategory.SCROBBLE,
meta: {
id: currentSong.id,