You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace print/verbose with standard logging (#337)
* logging: add NullHandler, replace prints with logging in auth and types
- lyricsgenius/__init__.py: add NullHandler per library logging best practice
- auth.py: replace print() with logger.warning/info
- types/base.py: remove verbose param from save_lyrics(), replace prints with logger.debug
- types/artist.py: deprecate verbose in add_song()/save_lyrics(), replace prints with logger.debug
- types/song.py: deprecate verbose in save_lyrics(), remove pass-through to super()
- types/album.py: deprecate verbose in save_lyrics(), remove pass-through to super()
* logging: replace self.verbose/print with logger in genius.py
- Remove self.verbose attribute entirely
- Deprecate verbose __init__ param with DeprecationWarning shim
- Replace all if self.verbose: print(...) guards with module-level
logger calls at appropriate levels:
- INFO: search progress, song count, artist name changes
- DEBUG: skipped/rejected songs, alternative search attempts
- WARNING: not-found results, missing lyrics sections
* logging: wire --verbose flag to logging in CLI
- Add module-level logger
- Drop verbose=args.verbose from Genius() constructor call
- --verbose now calls logging.basicConfig(level=DEBUG) so all
lyricsgenius log records surface to stderr
- Replace guarded print() for 'Saving lyrics' with logger.info()
* tests: remove deprecated verbose= kwargs from all test calls
* chore: bump version to 3.11.0
Replace print/verbose with standard Python logging (minor feature change).
* logging: add enable_logging() convenience helper
One-liner for scripts/notebooks that handles basicConfig with a
sensible default format:
lyricsgenius.enable_logging()
lyricsgenius.enable_logging(logging.INFO)
lyricsgenius.enable_logging(fmt='%(asctime)s %(levelname)s: %(message)s')
Updates README and docs accordingly.
0 commit comments