@@ -233,6 +233,35 @@ def process(self) -> LyricsControllerResult:
233233
234234 self .logger .info (f"LyricsTranscriber controller beginning processing for { self .artist } - { self .title } " )
235235
236+ # Debug: Log package version and environment variables
237+ try :
238+ import lyrics_transcriber
239+ package_version = getattr (lyrics_transcriber , '__version__' , 'unknown' )
240+ self .logger .info (f"LyricsTranscriber package version: { package_version } " )
241+ except Exception as e :
242+ self .logger .warning (f"Could not get package version: { e } " )
243+
244+ # Debug: Log environment variables (first 3 characters only for security)
245+ env_vars = {}
246+ for key , value in os .environ .items ():
247+ if value :
248+ env_vars [key ] = value [:3 ] + "..." if len (value ) > 3 else value
249+ else :
250+ env_vars [key ] = "(empty)"
251+
252+ self .logger .info (f"Environment variables count: { len (env_vars )} " )
253+
254+ # Log specific API-related variables
255+ api_vars = {k : v for k , v in env_vars .items () if any (keyword in k .upper () for keyword in ['API' , 'TOKEN' , 'KEY' , 'SECRET' ])}
256+ if api_vars :
257+ self .logger .info (f"API-related environment variables: { api_vars } " )
258+ else :
259+ self .logger .warning ("No API-related environment variables found" )
260+
261+ # Log all env vars if in debug mode
262+ if self .logger .getEffectiveLevel () <= logging .DEBUG :
263+ self .logger .debug (f"All environment variables: { env_vars } " )
264+
236265 # Check for existing corrections JSON
237266 corrections_json_path = os .path .join (self .output_config .output_dir , f"{ self .output_prefix } (Lyrics Corrections).json" )
238267
0 commit comments