@@ -183,6 +183,7 @@ async function copyDebugWavIfEnabled(
183183 } catch ( e ) {
184184 log . warn (
185185 {
186+ method : 'copyDebugWavIfEnabled' ,
186187 err : e ,
187188 metadata : { companionTxtPath, stationID : stationId } ,
188189 } ,
@@ -196,7 +197,11 @@ async function copyDebugWavIfEnabled(
196197 : { wavPath : debugCopyPath } ;
197198 } catch ( e ) {
198199 log . warn (
199- { err : e , metadata : { stationID : stationId , debugDir } } ,
200+ {
201+ method : 'copyDebugWavIfEnabled' ,
202+ err : e ,
203+ metadata : { stationID : stationId , debugDir } ,
204+ } ,
200205 'Debug capture WAV copy failed' ,
201206 ) ;
202207 return undefined ;
@@ -309,6 +314,7 @@ export async function runStationTick(station, store, logger, options = {}) {
309314 if ( cAttempt > 0 ) {
310315 log . info (
311316 {
317+ method : 'runStationTick' ,
312318 metadata : {
313319 stationID : station . id ,
314320 captureAttempt : cAttempt + 1 ,
@@ -335,6 +341,7 @@ export async function runStationTick(station, store, logger, options = {}) {
335341 ] ) ;
336342 log . error (
337343 {
344+ method : 'runStationTick' ,
338345 err : e ,
339346 metadata : {
340347 stationID : station . id ,
@@ -350,6 +357,7 @@ export async function runStationTick(station, store, logger, options = {}) {
350357 }
351358 log . warn (
352359 {
360+ method : 'runStationTick' ,
353361 err : e ,
354362 metadata : {
355363 stationID : station . id ,
@@ -386,7 +394,10 @@ export async function runStationTick(station, store, logger, options = {}) {
386394
387395 if ( gates . silence ) {
388396 log . debug (
389- { metadata : { stationID : station . id , meanDb : gates . meanDb } } ,
397+ {
398+ method : 'runStationTick' ,
399+ metadata : { stationID : station . id , meanDb : gates . meanDb } ,
400+ } ,
390401 'skip: silence' ,
391402 ) ;
392403 tickOutcome = 'skipped_silence' ;
@@ -401,6 +412,7 @@ export async function runStationTick(station, store, logger, options = {}) {
401412 if ( gates . speechHeavy ) {
402413 log . debug (
403414 {
415+ method : 'runStationTick' ,
404416 metadata : {
405417 stationID : station . id ,
406418 speechFrameRatio : gates . speechFrameRatio ,
@@ -426,7 +438,10 @@ export async function runStationTick(station, store, logger, options = {}) {
426438
427439 if ( prevFp && fingerprint === prevFp ) {
428440 log . debug (
429- { metadata : { stationID : station . id } } ,
441+ {
442+ method : 'runStationTick' ,
443+ metadata : { stationID : station . id } ,
444+ } ,
430445 'fingerprint unchanged; skip audio recognition APIs and Redis' ,
431446 ) ;
432447 tickOutcome = 'skipped_fingerprint_unchanged' ;
@@ -457,6 +472,7 @@ export async function runStationTick(station, store, logger, options = {}) {
457472 const msg = `${ name } was not used (SHAZAM_DISABLED=1).` ;
458473 log . info (
459474 {
475+ method : 'runStationTick' ,
460476 metadata : {
461477 stationID : station . id ,
462478 provider : id ,
@@ -512,6 +528,7 @@ export async function runStationTick(station, store, logger, options = {}) {
512528 const debugCopyPath = debugCopy ?. wavPath ;
513529 log . info (
514530 {
531+ method : 'runStationTick' ,
515532 metadata : {
516533 stationID : station . id ,
517534 capturePath : wavPath ,
@@ -551,6 +568,7 @@ export async function runStationTick(station, store, logger, options = {}) {
551568 . join ( ' — ' ) ;
552569 log . info (
553570 {
571+ method : 'runStationTick' ,
554572 metadata : {
555573 stationID : station . id ,
556574 provider : matchSource ,
@@ -579,7 +597,10 @@ export async function runStationTick(station, store, logger, options = {}) {
579597
580598 if ( prevKey === key ) {
581599 log . debug (
582- { metadata : { stationID : station . id } } ,
600+ {
601+ method : 'runStationTick' ,
602+ metadata : { stationID : station . id } ,
603+ } ,
583604 'same track key as Redis; skip write' ,
584605 ) ;
585606 tickOutcome = 'skipped_same_track_as_cache' ;
@@ -653,7 +674,11 @@ export async function runStationTick(station, store, logger, options = {}) {
653674 } catch ( e ) {
654675 tickOutcome = 'error' ;
655676 log . error (
656- { err : e , metadata : { stationID : station . id } } ,
677+ {
678+ method : 'runStationTick' ,
679+ err : e ,
680+ metadata : { stationID : station . id } ,
681+ } ,
657682 'Station tick failed' ,
658683 ) ;
659684 try {
0 commit comments